<main><divclass="width-limiter"><navclass="sub"><formclass="search-form"><span></span><divid="sidebar-button"tabindex="-1"><ahref="../syn/all.html"title="show sidebar"></a></div><inputclass="search-input"name="search"aria-label="Run search in the documentation"autocomplete="off"spellcheck="false"placeholder="Click or press ‘S’ to search, ‘?’ for more options…"type="search"><divid="help-button"tabindex="-1"><ahref="../help.html"title="help">?</a></div><divid="settings-menu"tabindex="-1"><ahref="../settings.html"title="settings"><imgwidth="22"height="22"alt="Change settings"src="../static.files/wheel-7b819b6101059cd0.svg"></a></div></form></nav><sectionid="main-content"class="content"><divclass="main-heading"><h1>Crate <aclass="mod"href="#">syn</a><buttonid="copy-path"title="Copy item path to clipboard"><imgsrc="../static.files/clipboard-7571035ce49a181d.svg"width="19"height="18"alt="Copy item path"></button></h1><spanclass="out-of-band"><aclass="src"href="../src/syn/lib.rs.html#1-1008">source</a> · <buttonid="toggle-all-docs"title="collapse all docs">[<span>−</span>]</button></span></div><detailsclass="toggle top-doc"open><summaryclass="hideme"><span>Expand description</span></summary><divclass="docblock"><p><ahref="https://github.com/dtolnay/syn"><imgsrc="https://img.shields.io/badge/github-8da0cb?style=for-the-badge&labelColor=555555&logo=github"alt="github"/></a><ahref="https://crates.io/crates/syn"><imgsrc="https://img.shields.io/badge/crates.io-fc8d62?style=for-the-badge&labelColor=555555&logo=rust"alt="crates-io"/></a><ahref="index.html"title="mod syn"><imgsrc="https://img.shields.io/badge/docs.rs-66c2a5?style=for-the-badge&labelColor=555555&logo=docs.rs"alt="docs-rs"/></a></p>
<spanclass="comment">// Hand the output tokens back to the compiler
</span>TokenStream::from(expanded)
}</code></pre></div>
<p>The <ahref="https://github.com/dtolnay/syn/tree/master/examples/heapsize"><code>heapsize</code></a> example directory shows a complete working implementation
of a derive macro. The example derives a <code>HeapSize</code> trait which computes an
estimate of the amount of heap memory owned by a value.</p>
<p>The <ahref="https://github.com/dtolnay/syn/tree/master/examples/lazy-static"><code>lazy-static</code></a> example directory shows the implementation of a
<code>functionlike!(...)</code> procedural macro in which the input tokens are parsed
using Syn’s parsing API.</p>
<p>The example reimplements the popular <code>lazy_static</code> crate from crates.io as a
<p>When developing a procedural macro it can be helpful to look at what the
generated code looks like. Use <code>cargo rustc -- -Zunstable-options --pretty=expanded</code> or the <ahref="https://github.com/dtolnay/cargo-expand"><code>cargo expand</code></a> subcommand.</p>
<p>To show the expanded code for some crate that uses your procedural macro,
run <code>cargo expand</code> from that crate. To show the expanded code for one of
your own test cases, run <code>cargo expand --test the_test_case</code> where the last
argument is the name of the test file without the <code>.rs</code> extension.</p>
<p>This write-up by Brandon W Maister discusses debugging in more detail:
<ahref="https://quodlibetor.github.io/posts/debugging-rusts-new-custom-derive-system/">Debugging Rust’s new Custom Derive system</a>.</p>
</div></details><h2id="modules"class="section-header">Modules<ahref="#modules"class="anchor">§</a></h2><ulclass="item-table"><li><divclass="item-name"><aclass="mod"href="buffer/index.html"title="mod syn::buffer">buffer</a></div><divclass="desc docblock-short">A stably addressed token buffer supporting efficient traversal based on a
cheaply copyable cursor.</div></li><li><divclass="item-name"><aclass="mod"href="ext/index.html"title="mod syn::ext">ext</a></div><divclass="desc docblock-short">Extension traits to provide parsing methods on foreign types.</div></li><li><divclass="item-name"><aclass="mod"href="fold/index.html"title="mod syn::fold">fold</a></div><divclass="desc docblock-short">Syntax tree traversal to transform the nodes of an owned syntax tree.</div></li><li><divclass="item-name"><aclass="mod"href="meta/index.html"title="mod syn::meta">meta</a></div><divclass="desc docblock-short">Facility for interpreting structured content inside of an <code>Attribute</code>.</div></li><li><divclass="item-name"><aclass="mod"href="parse/index.html"title="mod syn::parse">parse</a></div><divclass="desc docblock-short">Parsing interface for parsing a token stream into a syntax tree node.</div></li><li><divclass="item-name"><aclass="mod"href="punctuated/index.html"title="mod syn::punctuated">punctuated</a></div><divclass="desc docblock-short">A punctuated sequence of syntax tree nodes separated by punctuation.</div></li><li><divclass="item-name"><aclass="mod"href="spanned/index.html"title="mod syn::spanned">spanned</a></div><divclass="desc docblock-short">A trait that can provide the <code>Span</code> of the complete contents of a syntax
tree node.</div></li><li><divclass="item-name"><aclass="mod"href="token/index.html"title="mod syn::token">token</a></div><divclass="desc docblock-short">Tokens representing Rust punctuation, keywords, and delimiters.</div></li><li><divclass="item-name"><aclass="mod"href="visit_mut/index.html"title="mod syn::visit_mut">visit_mut</a></div><divclass="desc docblock-short">Syntax tree traversal to mutate an exclusive borrow of a syntax tree in
place.</div></li></ul><h2id="macros"class="section-header">Macros<ahref="#macros"class="anchor">§</a></h2><ulclass="item-table"><li><divclass="item-name"><aclass="macro"href="macro.Token.html"title="macro syn::Token">Token</a></div><divclass="desc docblock-short">A type-macro that expands to the name of the Rust type representation of a
given token.</div></li><li><divclass="item-name"><aclass="macro"href="macro.braced.html"title="macro syn::braced">braced</a></div><divclass="desc docblock-short">Parse a set of curly braces and expose their content to subsequent parsers.</div></li><li><divclass="item-name"><aclass="macro"href="macro.bracketed.html"title="macro syn::bracketed">bracketed</a></div><divclass="desc docblock-short">Parse a set of square brackets and expose their content to subsequent
parsers.</div></li><li><divclass="item-name"><aclass="macro"href="macro.custom_keyword.html"title="macro syn::custom_keyword">custom_keyword</a></div><divclass="desc docblock-short">Define a type that supports parsing and printing a given identifier as if it
were a keyword.</div></li><li><divclass="item-name"><aclass="macro"href="macro.custom_punctuation.html"title="macro syn::custom_punctuation">custom_punctuation</a></div><divclass="desc docblock-short">Define a type that supports parsing and printing a multi-character symbol
as if it were a punctuation token.</div></li><li><divclass="item-name"><aclass="macro"href="macro.parenthesized.html"title="macro syn::parenthesized">parenthesized</a></div><divclass="desc docblock-short">Parse a set of parentheses and expose their content to subsequent parsers.</div></li><li><divclass="item-name"><aclass="macro"href="macro.parse_macro_input.html"title="macro syn::parse_macro_input">parse_macro_input</a></div><divclass="desc docblock-short">Parse the input TokenStream of a macro, triggering a compile error if the
tokens fail to parse.</div></li><li><divclass="item-name"><aclass="macro"href="macro.parse_quote.html"title="macro syn::parse_quote">parse_quote</a></div><divclass="desc docblock-short">Quasi-quotation macro that accepts input like the <ahref="https://docs.rs/quote/1.0/quote/index.html"><code>quote!</code></a> macro but uses
type inference to figure out a return type for those tokens.</div></li><li><divclass="item-name"><aclass="macro"href="macro.parse_quote_spanned.html"title="macro syn::parse_quote_spanned">parse_quote_spanned</a></div><divclass="desc docblock-short">This macro is <ahref="macro.parse_quote.html"title="macro syn::parse_quote"><code>parse_quote!</code></a> + <ahref="../quote/macro.quote_spanned.html"title="macro quote::quote_spanned"><code>quote_spanned!</code></a>.</div></li></ul><h2id="structs"class="section-header">Structs<ahref="#structs"class="anchor">§</a></h2><ulclass="item-table"><li><divclass="item-name"><aclass="struct"href="struct.Abi.html"title="struct syn::Abi">Abi</a></div><divclass="desc docblock-short">The binary interface of a function: <code>extern "C"</code>.</div></li><li><divclass="item-name"><aclass="struct"href="struct.AngleBracketedGenericArguments.html"title="struct syn::AngleBracketedGenericArguments">AngleBracketedGenericArguments</a></div><divclass="desc docblock-short">Angle bracketed arguments of a path segment: the <code><K, V></code> in <code>HashMap<K, V></code>.</div></li><li><divclass="item-name"><aclass="struct"href="struct.Arm.html"title="struct syn::Arm">Arm</a></div><divclass="desc docblock-short">One arm of a <code>match</code> expression: <code>0..=10 => { return true; }</code>.</div></li><li><divclass="item-name"><aclass="struct"href="struct.AssocConst.html"title="struct syn::AssocConst">AssocConst</a></div><divclass="desc docblock-short">An equality constraint on an associated constant: the <code>PANIC = false</code> in
diverging <code>else</code> block.</div></li><li><divclass="item-name"><aclass="struct"href="struct.Macro.html"title="struct syn::Macro">Macro</a></div><divclass="desc docblock-short">A macro invocation: <code>println!("{}", mac)</code>.</div></li><li><divclass="item-name"><aclass="struct"href="struct.MetaList.html"title="struct syn::MetaList">MetaList</a></div><divclass="desc docblock-short">A structured list within an attribute, like <code>derive(Copy, Clone)</code>.</div></li><li><divclass="item-name"><aclass="struct"href="struct.MetaNameValue.html"title="struct syn::MetaNameValue">MetaNameValue</a></div><divclass="desc docblock-short">A name-value pair within an attribute, like <code>feature = "nightly"</code>.</div></li><li><divclass="item-name"><aclass="struct"href="struct.ParenthesizedGenericArguments.html"title="struct syn::ParenthesizedGenericArguments">ParenthesizedGenericArguments</a></div><divclass="desc docblock-short">Arguments of a function path segment: the <code>(A, B) -> C</code> in <code>Fn(A,B) -> C</code>.</div></li><li><divclass="item-name"><aclass="struct"href="struct.PatConst.html"title="struct syn::PatConst">PatConst</a></div><divclass="desc docblock-short">A const block: <code>const { ... }</code>.</div></li><li><divclass="item-name"><aclass="struct"href="struct.PatIdent.html"title="struct syn::PatIdent">PatIdent</a></div><divclass="desc docblock-short">A pattern that binds a new variable: <code>ref mut binding @ SUBPATTERN</code>.</div></li><li><divclass="item-name"><aclass="struct"href="struct.PatLit.html"title="struct syn::PatLit">PatLit</a></div><divclass="desc docblock-short">A literal in place of an expression: <code>1</code>, <code>"foo"</code>.</div></li><li><divclass="item-name"><aclass="struct"href="struct.PatMacro.html"title="struct syn::PatMacro">PatMacro</a></div><divclass="desc docblock-short">A macro invocation expression: <code>format!("{}", q)</code>.</div></li><li><divclass="item-name"><aclass="struct"href="struct.PatOr.html"title="struct syn::PatOr">PatOr</a></div><divclass="desc docblock-short">A pattern that matches any one of a set of cases.</div></li><li><divclass="item-name"><aclass="struct"href="struct.PatParen.html"title="struct syn::PatParen">PatParen</a></div><divclass="desc docblock-short">A parenthesized pattern: <code>(A | B)</code>.</div></li><li><divclass="item-name"><aclass="struct"href="struct.PatPath.html"title="struct syn::PatPath">PatPath</a></div><divclass="desc docblock-short">A path like <code>std::mem::replace</code> possibly containing generic
parameters and a qualified self-type.</div></li><li><divclass="item-name"><aclass="struct"href="struct.PatRange.html"title="struct syn::PatRange">PatRange</a></div><divclass="desc docblock-short">A range expression: <code>1..2</code>, <code>1..</code>, <code>..2</code>, <code>1..=2</code>, <code>..=2</code>.</div></li><li><divclass="item-name"><aclass="struct"href="struct.PatReference.html"title="struct syn::PatReference">PatReference</a></div><divclass="desc docblock-short">A reference pattern: <code>&mut var</code>.</div></li><li><divclass="item-name"><aclass="struct"href="struct.PatRest.html"title="struct syn::PatRest">PatRest</a></div><divclass="desc docblock-short">The dots in a tuple or slice pattern: <code>[0, 1, ..]</code>.</div></li><li><divclass="item-name"><aclass="struct"href="struct.PatSlice.html"title="struct syn::PatSlice">PatSlice</a></div><divclass="desc docblock-short">A dynamically sized slice pattern: <code>[a, b, ref i @ .., y, z]</code>.</div></li><li><divclass="item-name"><aclass="struct"href="struct.PatStruct.html"title="struct syn::PatStruct">PatStruct</a></div><divclass="desc docblock-short">A struct or struct variant pattern: <code>Variant { x, y, .. }</code>.</div></li><li><divclass="item-name"><aclass="struct"href="struct.PatTuple.html"title="struct syn::PatTuple">PatTuple</a></div><divclass="desc docblock-short">A tuple pattern: <code>(a, b)</code>.</div></li><li><divclass="item-name"><aclass="struct"href="struct.PatTupleStruct.html"title="struct syn::PatTupleStruct">PatTupleStruct</a></div><divclass="desc docblock-short">A tuple struct or tuple variant pattern: <code>Variant(x, y, .., z)</code>.</div></li><li><divclass="item-name"><aclass="struct"href="struct.PatType.html"title="struct syn::PatType">PatType</a></div><divclass="desc docblock-short">A type ascription pattern: <code>foo: f64</code>.</div></li><li><divclass="item-name"><aclass="struct"href="struct.PatWild.html"title="struct syn::PatWild">PatWild</a></div><divclass="desc docblock-short">A pattern that matches any value: <code>_</code>.</div></li><li><divclass="item-name"><aclass="struct"href="struct.Path.html"title="struct syn::Path">Path</a></div><divclass="desc docblock-short">A path at which a named item is exported (e.g. <code>std::collections::HashMap</code>).</div></li><li><divclass="item-name"><aclass="struct"href="struct.PathSegment.html"title="struct syn::PathSegment">PathSegment</a></div><divclass="desc docblock-short">A segment of a path together with any path arguments on that segment.</div></li><li><divclass="item-name"><aclass="struct"href="struct.PredicateLifetime.html"title="struct syn::PredicateLifetime">PredicateLifetime</a></div><divclass="desc docblock-short">A lifetime predicate in a <code>where</code> clause: <code>'a: 'b + 'c</code>.</div></li><li><divclass="item-name"><aclass="struct"href="struct.PredicateType.html"title="struct syn::PredicateType">PredicateType</a></div><divclass="desc docblock-short">A type predicate in a <code>where</code> clause: <code>for<'c> Foo<'c>: Trait<'c></code>.</div></li><li><divclass="item-name"><aclass="struct"href="struct.QSelf.html"title="struct syn::QSelf">QSelf</a></div><divclass="desc docblock-short">The explicit Self type in a qualified path: the <code>T</code> in <code><T as Display>::fmt</code>.</div></li><li><divclass="item-name"><aclass="struct"href="struct.Receiver.html"title="struct syn::Receiver">Receiver</a></div><divclass="desc docblock-short">The <code>self</code> argument of an associated method.</div></li><li><divclass="item-name"><aclass="struct"href="struct.Signature.html"title="struct syn::Signature">Signature</a></div><divclass="desc docblock-short">A function signature in a trait or implementation: <code>unsafe fn initialize(&self)</code>.</div></li><li><divclass="item-name"><aclass="struct"href="struct.StmtMacro.html"title="struct syn::StmtMacro">StmtMacro</a></div><divclass="desc docblock-short">A macro invocation in statement positi
a lifetime.</div></li><li><divclass="item-name"><aclass="struct"href="struct.TypeInfer.html"title="struct syn::TypeInfer">TypeInfer</a></div><divclass="desc docblock-short">Indication that a type should be inferred by the compiler: <code>_</code>.</div></li><li><divclass="item-name"><aclass="struct"href="struct.TypeMacro.html"title="struct syn::TypeMacro">TypeMacro</a></div><divclass="desc docblock-short">A macro in the type position.</div></li><li><divclass="item-name"><aclass="struct"href="struct.TypeNever.html"title="struct syn::TypeNever">TypeNever</a></div><divclass="desc docblock-short">The never type: <code>!</code>.</div></li><li><divclass="item-name"><aclass="struct"href="struct.TypeParam.html"title="struct syn::TypeParam">TypeParam</a></div><divclass="desc docblock-short">A generic type parameter: <code>T: Into<String></code>.</div></li><li><divclass="item-name"><aclass="struct"href="struct.TypeParen.html"title="struct syn::TypeParen">TypeParen</a></div><divclass="desc docblock-short">A parenthesized type equivalent to the inner type.</div></li><li><divclass="item-name"><aclass="struct"href="struct.TypePath.html"title="struct syn::TypePath">TypePath</a></div><divclass="desc docblock-short">A path like <code>std::slice::Iter</code>, optionally qualified with a
self-type as in <code><Vec<T> as SomeTrait>::Associated</code>.</div></li><li><divclass="item-name"><aclass="struct"href="struct.TypePtr.html"title="struct syn::TypePtr">TypePtr</a></div><divclass="desc docblock-short">A raw pointer type: <code>*const T</code> or <code>*mut T</code>.</div></li><li><divclass="item-name"><aclass="struct"href="struct.TypeReference.html"title="struct syn::TypeReference">TypeReference</a></div><divclass="desc docblock-short">A reference type: <code>&'a T</code> or <code>&'a mut T</code>.</div></li><li><divclass="item-name"><aclass="struct"href="struct.TypeSlice.html"title="struct syn::TypeSlice">TypeSlice</a></div><divclass="desc docblock-short">A dynamically sized slice type: <code>[T]</code>.</div></li><li><divclass="item-name"><aclass="struct"href="struct.TypeTraitObject.html"title="struct syn::TypeTraitObject">TypeTraitObject</a></div><divclass="desc docblock-short">A trait object type <code>dyn Bound1 + Bound2 + Bound3</code> where <code>Bound</code> is a
trait or a lifetime.</div></li><li><divclass="item-name"><aclass="struct"href="struct.TypeTuple.html"title="struct syn::TypeTuple">TypeTuple</a></div><divclass="desc docblock-short">A tuple type: <code>(A, B, C, String)</code>.</div></li><li><divclass="item-name"><aclass="struct"href="struct.UseGlob.html"title="struct syn::UseGlob">UseGlob</a></div><divclass="desc docblock-short">A glob import in a <code>use</code> item: <code>*</code>.</div></li><li><divclass="item-name"><aclass="struct"href="struct.UseGroup.html"title="struct syn::UseGroup">UseGroup</a></div><divclass="desc docblock-short">A braced group of imports in a <code>use</code> item: <code>{A, B, C}</code>.</div></li><li><divclass="item-name"><aclass="struct"href="struct.UseName.html"title="struct syn::UseName">UseName</a></div><divclass="desc docblock-short">An identifier imported by a <code>use</code> item: <code>HashMap</code>.</div></li><li><divclass="item-name"><aclass="struct"href="struct.UsePath.html"title="struct syn::UsePath">UsePath</a></div><divclass="desc docblock-short">A path prefix of imports in a <code>use</code> item: <code>std::...</code>.</div></li><li><divclass="item-name"><aclass="struct"href="struct.UseRename.html"title="struct syn::UseRename">UseRename</a></div><divclass="desc docblock-short">An renamed identifier imported by a <code>use</code> item: <code>HashMap as Map</code>.</div></li><li><divclass="item-name"><aclass="struct"href="struct.Variadic.html"title="struct syn::Variadic">Variadic</a></div><divclass="desc docblock-short">The variadic argument of a foreign function.</div></li><li><divclass="item-name"><aclass="struct"href="struct.Variant.html"title="struct syn::Variant">Variant</a></div><divclass="desc docblock-short">An enum variant.</div></li><li><divclass="item-name"><aclass="struct"href="struct.VisRestricted.html"title="struct syn::VisRestricted">VisRestricted</a></div><divclass="desc docblock-short">A visibility level restricted to some path: <code>pub(self)</code> or
<code>pub(super)</code> or <code>pub(crate)</code> or <code>pub(in some::module)</code>.</div></li><li><divclass="item-name"><aclass="struct"href="struct.WhereClause.html"title="struct syn::WhereClause">WhereClause</a></div><divclass="desc docblock-short">A <code>where</code> clause in a definition: <code>where T: Deserialize<'de>, D: 'static</code>.</div></li></ul><h2id="enums"class="section-header">Enums<ahref="#enums"class="anchor">§</a></h2><ulclass="item-table"><li><divclass="item-name"><aclass="enum"href="enum.AttrStyle.html"title="enum syn::AttrStyle">AttrStyle</a></div><divclass="desc docblock-short">Distinguishes between attributes that decorate an item and attributes
that are contained within an item.</div></li><li><divclass="item-name"><aclass="enum"href="enum.BinOp.html"title="enum syn::BinOp">BinOp</a></div><divclass="desc docblock-short">A binary operator: <code>+</code>, <code>+=</code>, <code>&</code>.</div></li><li><divclass="item-name"><aclass="enum"href="enum.Data.html"title="enum syn::Data">Data</a></div><divclass="desc docblock-short">The storage of a struct, enum or union data structure.</div></li><li><divclass="item-name"><aclass="enum"href="enum.Expr.html"title="enum syn::Expr">Expr</a></div><divclass="desc docblock-short">A Rust expression.</div></li><li><divclass="item-name"><aclass="enum"href="enum.FieldMutability.html"title="enum syn::FieldMutability">FieldMutability</a></div><divclass="desc docblock-short">Unused, but reserved for RFC 3323 restrictions.</div></li><li><divclass="item-name"><aclass="enum"href="enum.Fields.html"title="enum syn::Fields">Fields</a></div><divclass="desc docblock-short">Data stored within an enum variant or struct.</div></li><li><divclass="item-name"><aclass="enum"href="enum.FnArg.html"title="enum syn::FnArg">FnArg</a></div><divclass="desc docblock-short">An argument in a function signature: the <code>n: usize</code> in <code>fn f(n: usize)</code>.</div></li><li><divclass="item-name"><aclass="enum"href="enum.ForeignItem.html"title="enum syn::ForeignItem">ForeignItem</a></div><divclass="desc docblock-short">An item within an <code>extern</code> block.</div></li><li><divclass="item-name"><aclass="enum"href="enum.GenericArgument.html"title="enum syn::GenericArgument">GenericArgument</a></div><divclass="desc docblock-short">An individual generic argument, like <code>'a</code>, <code>T</code>, or <code>Item = T</code>.</div></li><li><divclass="item-name"><aclass="enum"href="enum.GenericParam.html"title="enum syn::GenericParam">GenericParam</a></div><divclass="desc docblock-short">A generic type parameter, lifetime, or const generic: <code>T: Into<String></code>,
<code>'a: 'b</code>, <code>const LEN: usize</code>.</div></li><li><divclass="item-name"><aclass="enum"href="enum.ImplItem.html"title="enum syn::ImplItem">ImplItem</a></div><divclass="desc docblock-short">An item within an impl block.</div></li><li><divclass="item-name"><aclass="enum"href="enum.ImplRestriction.html"title="enum syn::ImplRestriction">ImplRestriction</a></div><divclass="desc docblock-short">Unused, but reserved for RFC 3323 restrictions.</div></li><li><divclass="item-name"><aclass="enum"href="enum.Item.html"title="enum syn::Item">Item</a></div><divclass="desc docblock-short">Things that can appear directly inside of a module or scope.</div></li><li><divclass="item-name"><aclass="enum"href="enum.Lit.html"title="enum syn::Lit">Lit</a></div><divclass="desc docblock-short">A Rust literal such as a string or integer or boolean.</div></li><li><divclass="item-name"><aclass="enum"href="enum.MacroDelimiter.html"title="enum syn::MacroDelimiter">MacroDelimiter</a></div><divclass="desc docblock-short">A grouping token that surrounds a macro body: <code>m!(...)</code> or <code>m!{...}</code> or <code>m![...]</code>.</div></li><li><divclass="item-name"><aclass="enum"href="enum.Member.html"title="enum syn::Member">Member</a></div><divclass="desc docblock-short">A struct or tuple struct field accessed in a struct literal or field
expression.</div></li><li><divclass="item-name"><aclass="enum"href="enum.Meta.html"title="enum syn::Meta">Meta</a></div><divclass="desc docblock-short">Content of a compile-time structured attribute.</div></li><li><divclass="item-name"><aclass="enum"href="enum.Pat.html"title="enum syn::Pat">Pat</a></div><divclass="desc docblock-short">A pattern in a local binding, function signature, match expression, or
various other places.</div></li><li><divclass="item-name"><aclass="enum"href="enum.PathArguments.html"title="enum syn::PathArguments">PathArguments</a></div><divclass="desc docblock-short">Angle bracketed or parenthesized arguments of a path segment.</div></li><li><divclass="item-name"><aclass="enum"href="enum.RangeLimits.html"title="enum syn::RangeLimits">RangeLimits</a></div><divclass="desc docblock-short">Limit types of a range, inclusive or exclusive.</div></li><li><divclass="item-name"><aclass="enum"href="enum.ReturnType.html"title="enum syn::ReturnType">ReturnType</a></div><divclass="desc docblock-short">Return type of a function signature.</div></li><li><divclass="item-name"><aclass="enum"href="enum.StaticMutability.html"title="enum syn::StaticMutability">StaticMutability</a></div><divclass="desc docblock-short">The mutability of an <code>Item::Static</code> or <code>ForeignItem::Static</code>.</div></li><li><divclass="item-name"><aclass="enum"href="enum.Stmt.html"title="enum syn::Stmt">Stmt</a></div><divclass="desc docblock-short">A statement, usually ending in a semicolon.</div></li><li><divclass="item-name"><aclass="enum"href="enum.TraitBoundModifier.html"title="enum syn::TraitBoundModifier">TraitBoundModifier</a></div><divclass="desc docblock-short">A modifier on a trait bound, currently only used for the <code>?</code> in
<code>?Sized</code>.</div></li><li><divclass="item-name"><aclass="enum"href="enum.TraitItem.html"title="enum syn::TraitItem">TraitItem</a></div><divclass="desc docblock-short">An item declaration within the definition of a trait.</div></li><li><divclass="item-name"><aclass="enum"href="enum.Type.html"title="enum syn::Type">Type</a></div><divclass="desc docblock-short">The possible types that a Rust value could have.</div></li><li><divclass="item-name"><aclass="enum"href="enum.TypeParamBound.html"title="enum syn::TypeParamBound">TypeParamBound</a></div><divclass="desc docblock-short">A trait or lifetime used as a bound on a type parameter.</div></li><li><divclass="item-name"><aclass="enum"href="enum.UnOp.html"title="enum syn::UnOp">UnOp</a></div><divclass="desc docblock-short">A unary operator: <code>*</code>, <code>!</code>, <code>-</code>.</div></li><li><divclass="item-name"><aclass="enum"href="enum.UseTree.html"title="enum syn::UseTree">UseTree</a></div><divclass="desc docblock-short">A suffix of an import tree in a <code>use</code> item: <code>Type as Renamed</code> or <code>*</code>.</div></li><li><divclass="item-name"><aclass="enum"href="enum.Visibility.html"title="enum syn::Visibility">Visibility</a></div><divclass="desc docblock-short">The visibility level of an item: inherited or <code>pub</code> or
<code>pub(restricted)</code>.</div></li><li><divclass="item-name"><aclass="enum"href="enum.WherePredicate.html"title="enum syn::WherePredicate">WherePredicate</a></div><divclass="desc docblock-short">A single predicate in a <code>where</code> clause: <code>T: Deserialize<'de></code>.</div></li></ul><h2id="functions"class="section-header">Functions<ahref="#functions"class="anchor">§</a></h2><ulclass="item-table"><li><divclass="item-name"><aclass="fn"href="fn.parse.html"title="fn syn::parse">parse</a></div><divclass="desc docblock-short">Parse tokens of source code into the chosen syntax tree node.</div></li><li><divclass="item-name"><aclass="fn"href="fn.parse2.html"title="fn syn::parse2">parse2</a></div><divclass="desc docblock-short">Parse a proc-macro2 token stream into the chosen syntax tree node.</div></li><li><divclass="item-name"><aclass="fn"href="fn.parse_file.html"title="fn syn::parse_file">parse_file</a></div><divclass="desc docblock-short">Parse the content of a file of Rust code.</div></li><li><divclass="item-name"><aclass="fn"href="fn.parse_str.html"title="fn syn::parse_str">parse_str</a></div><divclass="desc docblock-short">Parse a string of Rust code into the chosen syntax tree node.</div></li></ul><h2id="types"class="section-header">Type Aliases<ahref="#types"class="anchor">§</a></h2><ulclass="item-table"><li><divclass="item-name"><aclass="type"href="type.Result.html"title="type syn::Result">Result</a></div><divclass="desc docblock-short">The result of a Syn parser.</div></li></ul></section></div></main></body></html>