You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Trac3r-rust/doc/syn/struct.Ident.html

135 lines
66 KiB

5 years ago
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="API documentation for the Rust `Ident` struct in crate `syn`."><meta name="keywords" content="rust, rustlang, rust-lang, Ident"><title>syn::Ident - Rust</title><link rel="stylesheet" type="text/css" href="../normalize.css"><link rel="stylesheet" type="text/css" href="../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../dark.css"><link rel="stylesheet" type="text/css" href="../light.css" id="themeStyle"><script src="../storage.js"></script><noscript><link rel="stylesheet" href="../noscript.css"></noscript><link rel="shortcut icon" href="../favicon.ico"><style type="text/css">#crate-search{background-image:url("../down-arrow.svg");}</style></head><body class="rustdoc struct"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">&#9776;</div><a href='../syn/index.html'><div class='logo-container'><img src='../rust-logo.png' alt='logo'></div></a><p class='location'>Struct Ident</p><div class="sidebar-elems"><div class="block items"><a class="sidebar-title" href="#methods">Methods</a><div class="sidebar-links"><a href="#method.new">new</a><a href="#method.set_span">set_span</a><a href="#method.span">span</a></div><a class="sidebar-title" href="#implementations">Trait Implementations</a><div class="sidebar-links"><a href="#impl-Clone">Clone</a><a href="#impl-Debug">Debug</a><a href="#impl-Display">Display</a><a href="#impl-Eq">Eq</a><a href="#impl-From%3CCrate%3E">From&lt;Crate&gt;</a><a href="#impl-From%3CExtern%3E">From&lt;Extern&gt;</a><a href="#impl-From%3CIdent%3E">From&lt;Ident&gt;</a><a href="#impl-From%3CSelfType%3E">From&lt;SelfType&gt;</a><a href="#impl-From%3CSelfValue%3E">From&lt;SelfValue&gt;</a><a href="#impl-From%3CSuper%3E">From&lt;Super&gt;</a><a href="#impl-From%3CUnderscore%3E">From&lt;Underscore&gt;</a><a href="#impl-Hash">Hash</a><a href="#impl-IdentExt">IdentExt</a><a href="#impl-Ord">Ord</a><a href="#impl-Parse">Parse</a><a href="#impl-PartialEq%3CIdent%3E">PartialEq&lt;Ident&gt;</a><a href="#impl-PartialEq%3CT%3E">PartialEq&lt;T&gt;</a><a href="#impl-PartialOrd%3CIdent%3E">PartialOrd&lt;Ident&gt;</a><a href="#impl-ToTokens">ToTokens</a><a href="#impl-Token">Token</a></div><a class="sidebar-title" href="#synthetic-implementations">Auto Trait Implementations</a><div class="sidebar-links"><a href="#impl-RefUnwindSafe">!RefUnwindSafe</a><a href="#impl-Send">!Send</a><a href="#impl-Sync">!Sync</a><a href="#impl-Unpin">Unpin</a><a href="#impl-UnwindSafe">UnwindSafe</a></div><a class="sidebar-title" href="#blanket-implementations">Blanket Implementations</a><div class="sidebar-links"><a href="#impl-Any">Any</a><a href="#impl-Borrow%3CT%3E">Borrow&lt;T&gt;</a><a href="#impl-BorrowMut%3CT%3E">BorrowMut&lt;T&gt;</a><a href="#impl-From%3CT%3E">From&lt;T&gt;</a><a href="#impl-Into%3CU%3E">Into&lt;U&gt;</a><a href="#impl-Spanned">Spanned</a><a href="#impl-ToOwned">ToOwned</a><a href="#impl-ToString">ToString</a><a href="#impl-Token">Token</a><a href="#impl-TryFrom%3CU%3E">TryFrom&lt;U&gt;</a><a href="#impl-TryInto%3CU%3E">TryInto&lt;U&gt;</a></div></div><p class='location'><a href='index.html'>syn</a></p><script>window.sidebarCurrent = {name: 'Ident', ty: 'struct', relpath: ''};</script><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!"><img src="../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices"></div></div><script src="../theme.js"></script><nav class="sub"><form class="search-form js-only"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? f
<p>An identifier consists of at least one Unicode code point, the first of
which has the XID_Start property and the rest of which have the XID_Continue
property.</p>
<ul>
<li>The empty string is not an identifier. Use <code>Option&lt;Ident&gt;</code>.</li>
<li>A lifetime is not an identifier. Use <code>syn::Lifetime</code> instead.</li>
</ul>
<p>An identifier constructed with <code>Ident::new</code> is permitted to be a Rust
keyword, though parsing one through its <a href="https://docs.rs/syn/0.15/syn/parse/trait.Parse.html"><code>Parse</code></a> implementation rejects
Rust keywords. Use <code>input.call(Ident::parse_any)</code> when parsing to match the
behaviour of <code>Ident::new</code>.</p>
<h1 id="examples" class="section-header"><a href="#examples">Examples</a></h1>
<p>A new ident can be created from a string using the <code>Ident::new</code> function.
A span must be provided explicitly which governs the name resolution
behavior of the resulting identifier.</p>
<pre><code class="language-edition2018">use proc_macro2::{Ident, Span};
fn main() {
let call_ident = Ident::new(&quot;calligraphy&quot;, Span::call_site());
println!(&quot;{}&quot;, call_ident);
}
</code></pre>
<p>An ident can be interpolated into a token stream using the <code>quote!</code> macro.</p>
<pre><code class="language-edition2018">use proc_macro2::{Ident, Span};
use quote::quote;
fn main() {
let ident = Ident::new(&quot;demo&quot;, Span::call_site());
// Create a variable binding whose name is this ident.
let expanded = quote! { let #ident = 10; };
// Create a variable binding with a slightly different name.
let temp_ident = Ident::new(&amp;format!(&quot;new_{}&quot;, ident), Span::call_site());
let expanded = quote! { let #temp_ident = 10; };
}
</code></pre>
<p>A string representation of the ident is available through the <code>to_string()</code>
method.</p>
<pre><code class="language-edition2018"># use proc_macro2::{Ident, Span};
#
# let ident = Ident::new(&quot;another_identifier&quot;, Span::call_site());
#
// Examine the ident as a string.
let ident_string = ident.to_string();
if ident_string.len() &gt; 60 {
println!(&quot;Very long identifier: {}&quot;, ident_string)
}
</code></pre>
</div><h2 id='methods' class='small-section-header'>Methods<a href='#methods' class='anchor'></a></h2><h3 id='impl' class='impl'><code class='in-band'>impl <a class="struct" href="../syn/struct.Ident.html" title="struct syn::Ident">Ident</a></code><a href='#impl' class='anchor'></a><a class='srclink' href='../src/proc_macro2/lib.rs.html#824-889' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.new' class="method"><code id='new.v'>pub fn <a href='#method.new' class='fnname'>new</a>(string: &amp;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>, span: <a class="struct" href="../proc_macro2/struct.Span.html" title="struct proc_macro2::Span">Span</a>) -&gt; <a class="struct" href="../syn/struct.Ident.html" title="struct syn::Ident">Ident</a></code><a class='srclink' href='../src/proc_macro2/lib.rs.html#863-865' title='goto source code'>[src]</a></h4><div class='docblock'><p>Creates a new <code>Ident</code> with the given <code>string</code> as well as the specified
<code>span</code>.</p>
<p>The <code>string</code> argument must be a valid identifier permitted by the
language, otherwise the function will panic.</p>
<p>Note that <code>span</code>, currently in rustc, configures the hygiene information
for this identifier.</p>
<p>As of this time <code>Span::call_site()</code> explicitly opts-in to &quot;call-site&quot;
hygiene meaning that identifiers created with this span will be resolved
as if they were written directly at the location of the macro call, and
other code at the macro call site will be able to refer to them as well.</p>
<p>Later spans like <code>Span::def_site()</code> will allow to opt-in to
&quot;definition-site&quot; hygiene meaning that identifiers created with this
span will be resolved at the location of the macro definition and other
code at the macro call site will not be able to refer to them.</p>
<p>Due to the current importance of hygiene this constructor, unlike other
tokens, requires a <code>Span</code> to be specified at construction.</p>
<h1 id="panics" class="section-header"><a href="#panics">Panics</a></h1>
<p>Panics if the input string is neither a keyword nor a legal variable
name. If you are not sure whether the string contains an identifier and
need to handle an error case, use
<a href="https://docs.rs/syn/0.15/syn/fn.parse_str.html"><code
style="padding-right:0;">syn::parse_str</code></a><code
style="padding-left:0;">::&lt;Ident&gt;</code>
rather than <code>Ident::new</code>.</p>
</div><h4 id='method.span' class="method"><code id='span.v'>pub fn <a href='#method.span' class='fnname'>span</a>(&amp;self) -&gt; <a class="struct" href="../proc_macro2/struct.Span.html" title="struct proc_macro2::Span">Span</a></code><a class='srclink' href='../src/proc_macro2/lib.rs.html#880-882' title='goto source code'>[src]</a></h4><div class='docblock'><p>Returns the span of this <code>Ident</code>.</p>
</div><h4 id='method.set_span' class="method"><code id='set_span.v'>pub fn <a href='#method.set_span' class='fnname'>set_span</a>(&amp;mut self, span: <a class="struct" href="../proc_macro2/struct.Span.html" title="struct proc_macro2::Span">Span</a>)</code><a class='srclink' href='../src/proc_macro2/lib.rs.html#886-888' title='goto source code'>[src]</a></h4><div class='docblock'><p>Configures the span of this <code>Ident</code>, possibly changing its hygiene
context.</p>
</div></div><h2 id='implementations' class='small-section-header'>Trait Implementations<a href='#implementations' class='anchor'></a></h2><div id='implementations-list'><h3 id='impl-Debug' class='impl'><code class='in-band'>impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a> for <a class="struct" href="../syn/struct.Ident.html" title="struct syn::Ident">Ident</a></code><a href='#impl-Debug' class='anchor'></a><a class='srclink' href='../src/proc_macro2/lib.rs.html#934-938' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.fmt' class="method hidden"><code id='fmt.v'>fn <a href='https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html#tymethod.fmt' class='fnname'>fmt</a>(&amp;self, f: &amp;mut <a class="struct" href="https://doc.rust-lang.org/nightly/core/fmt/struct.Formatter.html" title="struct core::fmt::Formatter">Formatter</a>) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>, <a class="struct" href="https://doc.rust-lang.org/nightly/core/fmt/struct.Error.html" title="struct core::fmt::Error">Error</a>&gt;</code><a class='srclink' href='../src/proc_macro2/lib.rs.html#935-937' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Formats the value using the given formatter. <a href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html#tymethod.fmt">Read more</a></p>
</div></div><h3 id='impl-Clone' class='impl'><code class='in-band'>impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a> for <a class="struct" href="../syn/struct.Ident.html" title="struct syn::Ident">Ident</a></code><a href='#impl-Clone' class='anchor'></a><a class='srclink' href='../src/proc_macro2/lib.rs.html#818' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.clone' class="method hidden"><code id='clone.v'>fn <a href='https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#tymethod.clone' class='fnname'>clone</a>(&amp;self) -&gt; <a class="struct" href="../syn/struct.Ident.html" title="struct syn::Ident">Ident</a></code><a class='srclink' href='../src/proc_macro2/lib.rs.html#818' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Returns a copy of the value. <a href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#tymethod.clone">Read more</a></p>
</div><h4 id='method.clone_from' class="method hidden"><code id='clone_from.v'>fn <a href='https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#method.clone_from' class='fnname'>clone_from</a>(&amp;mut self, source: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>Self)</code><span class='since' title='Stable since Rust version 1.0.0'>1.0.0</span><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/clone.rs.html#131-133' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Performs copy-assignment from <code>source</code>. <a href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#method.clone_from">Read more</a></p>
</div></div><h3 id='impl-PartialOrd%3CIdent%3E' class='impl'><code class='in-band'>impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html" title="trait core::cmp::PartialOrd">PartialOrd</a>&lt;<a class="struct" href="../syn/struct.Ident.html" title="struct syn::Ident">Ident</a>&gt; for <a class="struct" href="../syn/struct.Ident.html" title="struct syn::Ident">Ident</a></code><a href='#impl-PartialOrd%3CIdent%3E' class='anchor'></a><a class='srclink' href='../src/proc_macro2/lib.rs.html#908-912' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.partial_cmp' class="method hidden"><code id='partial_cmp.v'>fn <a href='https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#tymethod.partial_cmp' class='fnname'>partial_cmp</a>(&amp;self, other: &amp;<a class="struct" href="../syn/struct.Ident.html" title="struct syn::Ident">Ident</a>) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;<a class="enum" href="https://doc.rust-lang.org/nightly/core/cmp/enum.Ordering.html" title="enum core::cmp::Ordering">Ordering</a>&gt;</code><a class='srclink' href='../src/proc_macro2/lib.rs.html#909-911' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>This method returns an ordering between <code>self</code> and <code>other</code> values if one exists. <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#tymethod.partial_cmp">Read more</a></p>
</div><h4 id='method.lt' class="method hidden"><code id='lt.v'><span class="docblock attributes">#[must_use]
</span>fn <a href='https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#method.lt' class='fnname'>lt</a>(&amp;self, other: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>Rhs) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code><span class='since' title='Stable since Rust version 1.0.0'>1.0.0</span><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/cmp.rs.html#801-806' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>This method tests less than (for <code>self</code> and <code>other</code>) and is used by the <code>&lt;</code> operator. <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#method.lt">Read more</a></p>
</div><h4 id='method.le' class="method hidden"><code id='le.v'><span class="docblock attributes">#[must_use]
</span>fn <a href='https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#method.le' class='fnname'>le</a>(&amp;self, other: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>Rhs) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code><span class='since' title='Stable since Rust version 1.0.0'>1.0.0</span><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/cmp.rs.html#823-828' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>This method tests less than or equal to (for <code>self</code> and <code>other</code>) and is used by the <code>&lt;=</code> operator. <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#method.le">Read more</a></p>
</div><h4 id='method.gt' class="method hidden"><code id='gt.v'><span class="docblock attributes">#[must_use]
</span>fn <a href='https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#method.gt' class='fnname'>gt</a>(&amp;self, other: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>Rhs) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code><span class='since' title='Stable since Rust version 1.0.0'>1.0.0</span><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/cmp.rs.html#844-849' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>This method tests greater than (for <code>self</code> and <code>other</code>) and is used by the <code>&gt;</code> operator. <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#method.gt">Read more</a></p>
</div><h4 id='method.ge' class="method hidden"><code id='ge.v'><span class="docblock attributes">#[must_use]
</span>fn <a href='https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#method.ge' class='fnname'>ge</a>(&amp;self, other: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>Rhs) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code><span class='since' title='Stable since Rust version 1.0.0'>1.0.0</span><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/cmp.rs.html#866-871' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>This method tests greater than or equal to (for <code>self</code> and <code>other</code>) and is used by the <code>&gt;=</code> operator. <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#method.ge">Read more</a></p>
</div></div><h3 id='impl-Hash' class='impl'><code class='in-band'>impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/hash/trait.Hash.html" title="trait core::hash::Hash">Hash</a> for <a class="struct" href="../syn/struct.Ident.html" title="struct syn::Ident">Ident</a></code><a href='#impl-Hash' class='anchor'></a><a class='srclink' href='../src/proc_macro2/lib.rs.html#920-924' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.hash' class="method hidden"><code id='hash.v'>fn <a href='https://doc.rust-lang.org/nightly/core/hash/trait.Hash.html#tymethod.hash' class='fnname'>hash</a>&lt;H&gt;(&amp;self, hasher: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;mut </a>H) <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;H: <a class="trait" href="https://doc.rust-lang.org/nightly/core/hash/trait.Hasher.html" title="trait core::hash::Hasher">Hasher</a>,&nbsp;</span></code><a class='srclink' href='../src/proc_macro2/lib.rs.html#921-923' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Feeds this value into the given [<code>Hasher</code>]. <a href="https://doc.rust-lang.org/nightly/core/hash/trait.Hash.html#tymethod.hash">Read more</a></p>
</div><h4 id='method.hash_slice' class="method hidden"><code id='hash_slice.v'>fn <a href='https://doc.rust-lang.org/nightly/core/hash/trait.Hash.html#method.hash_slice' class='fnname'>hash_slice</a>&lt;H&gt;(data: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">&amp;[Self]</a>, state: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;mut </a>H) <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;H: <a class="trait" href="https://doc.rust-lang.org/nightly/core/hash/trait.Hasher.html" title="trait core::hash::Hasher">Hasher</a>,&nbsp;</span></code><span class='since' title='Stable since Rust version 1.3.0'>1.3.0</span><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/hash/mod.rs.html#192-198' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Feeds a slice of this type into the given [<code>Hasher</code>]. <a href="https://doc.rust-lang.org/nightly/core/hash/trait.Hash.html#method.hash_slice">Read more</a></p>
</div></div><h3 id='impl-Ord' class='impl'><code class='in-band'>impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/cmp/trait.Ord.html" title="trait core::cmp::Ord">Ord</a> for <a class="struct" href="../syn/struct.Ident.html" title="struct syn::Ident">Ident</a></code><a href='#impl-Ord' class='anchor'></a><a class='srclink' href='../src/proc_macro2/lib.rs.html#914-918' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.cmp' class="method hidden"><code id='cmp.v'>fn <a href='https://doc.rust-lang.org/nightly/core/cmp/trait.Ord.html#tymethod.cmp' class='fnname'>cmp</a>(&amp;self, other: &amp;<a class="struct" href="../syn/struct.Ident.html" title="struct syn::Ident">Ident</a>) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/cmp/enum.Ordering.html" title="enum core::cmp::Ordering">Ordering</a></code><a class='srclink' href='../src/proc_macro2/lib.rs.html#915-917' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>This method returns an <code>Ordering</code> between <code>self</code> and <code>other</code>. <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.Ord.html#tymethod.cmp">Read more</a></p>
</div><h4 id='method.max' class="method hidden"><code id='max.v'>fn <a href='https://doc.rust-lang.org/nightly/core/cmp/trait.Ord.html#method.max' class='fnname'>max</a>(self, other: Self) -&gt; Self</code><span class='since' title='Stable since Rust version 1.21.0'>1.21.0</span><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/cmp.rs.html#571-574' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Compares and returns the maximum of two values. <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.Ord.html#method.max">Read more</a></p>
</div><h4 id='method.min' class="method hidden"><code id='min.v'>fn <a href='https://doc.rust-lang.org/nightly/core/cmp/trait.Ord.html#method.min' class='fnname'>min</a>(self, other: Self) -&gt; Self</code><span class='since' title='Stable since Rust version 1.21.0'>1.21.0</span><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/cmp.rs.html#588-591' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Compares and returns the minimum of two values. <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.Ord.html#method.min">Read more</a></p>
</div><h4 id='method.clamp' class="method hidden"><code id='clamp.v'>fn <a href='https://doc.rust-lang.org/nightly/core/cmp/trait.Ord.html#method.clamp' class='fnname'>clamp</a>(self, min: Self, max: Self) -&gt; Self</code><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/cmp.rs.html#612-622' title='goto source code'>[src]</a></h4><div class='stability hidden'><div class='stab unstable'><span class='emoji'>🔬</span> This is a nightly-only experimental API. (<code>clamp</code>)</div></div><div class='docblock hidden'><p>Restrict a value to a certain interval. <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.Ord.html#method.clamp">Read more</a></p>
</div></div><h3 id='impl-Eq' class='impl'><code class='in-band'>impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/cmp/trait.Eq.html" title="trait core::cmp::Eq">Eq</a> for <a class="struct" href="../syn/struct.Ident.html" title="struct syn::Ident">Ident</a></code><a href='#impl-Eq' class='anchor'></a><a class='srclink' href='../src/proc_macro2/lib.rs.html#906' title='goto source code'>[src]</a></h3><div class='impl-items'></div><h3 id='impl-From%3CIdent%3E' class='impl'><code class='in-band'>impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a>&lt;<a class="struct" href="../syn/struct.Ident.html" title="struct syn::Ident">Ident</a>&gt; for <a class="enum" href="../proc_macro2/enum.TokenTree.html" title="enum proc_macro2::TokenTree">TokenTree</a></code><a href='#impl-From%3CIdent%3E' class='anchor'></a><a class='srclink' href='../src/proc_macro2/lib.rs.html#497-501' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.from' class="method hidden"><code id='from.v'>fn <a href='https://doc.rust-lang.org/nightly/core/convert/trait.From.html#tymethod.from' class='fnname'>from</a>(g: <a class="struct" href="../syn/struct.Ident.html" title="struct syn::Ident">Ident</a>) -&gt; <a class="enum" href="../proc_macro2/enum.TokenTree.html" title="enum proc_macro2::TokenTree">TokenTree</a></code><a class='srclink' href='../src/proc_macro2/lib.rs.html#498-500' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Performs the conversion.</p>
</div></div><h3 id='impl-Display' class='impl'><code class='in-band'>impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/fmt/trait.Display.html" title="trait core::fmt::Display">Display</a> for <a class="struct" href="../syn/struct.Ident.html" title="struct syn::Ident">Ident</a></code><a href='#impl-Display' class='anchor'></a><a class='srclink' href='../src/proc_macro2/lib.rs.html#928-932' title='goto source code'>[src]</a></h3><div class='docblock'><p>Prints the identifier as a string that should be losslessly convertible back
into the same identifier.</p>
</div><div class='impl-items'><h4 id='method.fmt-1' class="method hidden"><code id='fmt.v-1'>fn <a href='https://doc.rust-lang.org/nightly/core/fmt/trait.Display.html#tymethod.fmt' class='fnname'>fmt</a>(&amp;self, f: &amp;mut <a class="struct" href="https://doc.rust-lang.org/nightly/core/fmt/struct.Formatter.html" title="struct core::fmt::Formatter">Formatter</a>) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>, <a class="struct" href="https://doc.rust-lang.org/nightly/core/fmt/struct.Error.html" title="struct core::fmt::Error">Error</a>&gt;</code><a class='srclink' href='../src/proc_macro2/lib.rs.html#929-931' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Formats the value using the given formatter. <a href="https://doc.rust-lang.org/nightly/core/fmt/trait.Display.html#tymethod.fmt">Read more</a></p>
</div></div><h3 id='impl-PartialEq%3CT%3E' class='impl'><code class='in-band'>impl&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html" title="trait core::cmp::PartialEq">PartialEq</a>&lt;T&gt; for <a class="struct" href="../syn/struct.Ident.html" title="struct syn::Ident">Ident</a> <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.AsRef.html" title="trait core::convert::AsRef">AsRef</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>&gt; + ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,&nbsp;</span></code><a href='#impl-PartialEq%3CT%3E' class='anchor'></a><a class='srclink' href='../src/proc_macro2/lib.rs.html#897-904' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.eq' class="method hidden"><code id='eq.v'>fn <a href='https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html#tymethod.eq' class='fnname'>eq</a>(&amp;self, other: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>T) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code><a class='srclink' href='../src/proc_macro2/lib.rs.html#901-903' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>This method tests for <code>self</code> and <code>other</code> values to be equal, and is used by <code>==</code>. <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html#tymethod.eq">Read more</a></p>
</div><h4 id='method.ne' class="method hidden"><code id='ne.v'><span class="docblock attributes">#[must_use]
</span>fn <a href='https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html#method.ne' class='fnname'>ne</a>(&amp;self, other: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>Rhs) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code><span class='since' title='Stable since Rust version 1.0.0'>1.0.0</span><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/cmp.rs.html#208' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>This method tests for <code>!=</code>.</p>
</div></div><h3 id='impl-PartialEq%3CIdent%3E' class='impl'><code class='in-band'>impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html" title="trait core::cmp::PartialEq">PartialEq</a>&lt;<a class="struct" href="../syn/struct.Ident.html" title="struct syn::Ident">Ident</a>&gt; for <a class="struct" href="../syn/struct.Ident.html" title="struct syn::Ident">Ident</a></code><a href='#impl-PartialEq%3CIdent%3E' class='anchor'></a><a class='srclink' href='../src/proc_macro2/lib.rs.html#891-895' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.eq-1' class="method hidden"><code id='eq.v-1'>fn <a href='https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html#tymethod.eq' class='fnname'>eq</a>(&amp;self, other: &amp;<a class="struct" href="../syn/struct.Ident.html" title="struct syn::Ident">Ident</a>) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code><a class='srclink' href='../src/proc_macro2/lib.rs.html#892-894' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>This method tests for <code>self</code> and <code>other</code> values to be equal, and is used by <code>==</code>. <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html#tymethod.eq">Read more</a></p>
</div><h4 id='method.ne-1' class="method hidden"><code id='ne.v-1'><span class="docblock attributes">#[must_use]
</span>fn <a href='https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html#method.ne' class='fnname'>ne</a>(&amp;self, other: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>Rhs) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code><span class='since' title='Stable since Rust version 1.0.0'>1.0.0</span><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/cmp.rs.html#208' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>This method tests for <code>!=</code>.</p>
</div></div><h3 id='impl-ToTokens' class='impl'><code class='in-band'>impl <a class="trait" href="../quote/to_tokens/trait.ToTokens.html" title="trait quote::to_tokens::ToTokens">ToTokens</a> for <a class="struct" href="../syn/struct.Ident.html" title="struct syn::Ident">Ident</a></code><a href='#impl-ToTokens' class='anchor'></a><a class='srclink' href='../src/quote/to_tokens.rs.html#173-177' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.to_tokens' class="method hidden"><code id='to_tokens.v'>fn <a href='../quote/to_tokens/trait.ToTokens.html#tymethod.to_tokens' class='fnname'>to_tokens</a>(&amp;self, tokens: &amp;mut <a class="struct" href="../proc_macro2/struct.TokenStream.html" title="struct proc_macro2::TokenStream">TokenStream</a>)</code><a class='srclink' href='../src/quote/to_tokens.rs.html#174-176' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Write <code>self</code> to the given <code>TokenStream</code>. <a href="../quote/to_tokens/trait.ToTokens.html#tymethod.to_tokens">Read more</a></p>
</div><h4 id='method.into_token_stream' class="method hidden"><code id='into_token_stream.v'>fn <a href='../quote/to_tokens/trait.ToTokens.html#method.into_token_stream' class='fnname'>into_token_stream</a>(self) -&gt; <a class="struct" href="../proc_macro2/struct.TokenStream.html" title="struct proc_macro2::TokenStream">TokenStream</a></code><a class='srclink' href='../src/quote/to_tokens.rs.html#61-68' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Convert <code>self</code> directly into a <code>TokenStream</code> object. <a href="../quote/to_tokens/trait.ToTokens.html#method.into_token_stream">Read more</a></p>
</div></div><h3 id='impl-Token' class='impl'><code class='in-band'>impl <a class="trait" href="../syn/token/trait.Token.html" title="trait syn::token::Token">Token</a> for <a class="struct" href="../syn/struct.Ident.html" title="struct syn::Ident">Ident</a></code><a href='#impl-Token' class='anchor'></a><a class='srclink' href='../src/syn/ident.rs.html#52-64' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.peek' class="method hidden"><code id='peek.v'>fn <a href='../syn/token/trait.Token.html#tymethod.peek' class='fnname'>peek</a>(cursor: <a class="struct" href="../syn/buffer/struct.Cursor.html" title="struct syn::buffer::Cursor">Cursor</a>) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code><a class='srclink' href='../src/syn/ident.rs.html#53-59' title='goto source code'>[src]</a></h4><h4 id='method.display' class="method hidden"><code id='display.v'>fn <a href='../syn/token/trait.Token.html#tymethod.display' class='fnname'>display</a>() -&gt; &amp;'static <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a></code><a class='srclink' href='../src/syn/ident.rs.html#61-63' title='goto source code'>[src]</a></h4></div><h3 id='impl-IdentExt' class='impl'><code class='in-band'>impl <a class="trait" href="../syn/ext/trait.IdentExt.html" title="trait syn::ext::IdentExt">IdentExt</a> for <a class="struct" href="../syn/struct.Ident.html" title="struct syn::Ident">Ident</a></code><a href='#impl-IdentExt' class='anchor'></a><a class='srclink' href='../src/syn/ext.rs.html#96-112' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.parse_any' class="method hidden"><code id='parse_any.v'>fn <a href='../syn/ext/trait.IdentExt.html#tymethod.parse_any' class='fnname'>parse_any</a>(input: <a class="type" href="../syn/parse/type.ParseStream.html" title="type syn::parse::ParseStream">ParseStream</a>) -&gt; <a class="type" href="../syn/parse/type.Result.html" title="type syn::parse::Result">Result</a>&lt;Self&gt;</code><a class='srclink' href='../src/syn/ext.rs.html#97-102' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Parses any identifier including keywords. <a href="../syn/ext/trait.IdentExt.html#tymethod.parse_any">Read more</a></p>
</div><h4 id='method.unraw' class="method hidden"><code id='unraw.v'>fn <a href='../syn/ext/trait.IdentExt.html#tymethod.unraw' class='fnname'>unraw</a>(&amp;self) -&gt; <a class="struct" href="../syn/struct.Ident.html" title="struct syn::Ident">Ident</a></code><a class='srclink' href='../src/syn/ext.rs.html#104-111' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Strips the raw marker <code>r#</code>, if any, from the beginning of an ident. <a href="../syn/ext/trait.IdentExt.html#tymethod.unraw">Read more</a></p>
</div><h4 id='associatedconstant.peek_any' class="associatedconstant hidden"><code id='peek_any.v'>const <a href='../syn/ext/trait.IdentExt.html#associatedconstant.peek_any' class="constant"><b>peek_any</b></a>: PeekFn</code><a class='srclink' href='../src/syn/ext.rs.html#64' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Peeks any identifier including keywords. Usage: <code>input.peek(Ident::peek_any)</code> <a href="../syn/ext/trait.IdentExt.html#associatedconstant.peek_any">Read more</a></p>
</div></div><h3 id='impl-Parse' class='impl'><code class='in-band'>impl <a class="trait" href="../syn/parse/trait.Parse.html" title="trait syn::parse::Parse">Parse</a> for <a class="struct" href="../syn/struct.Ident.html" title="struct syn::Ident">Ident</a></code><a href='#impl-Parse' class='anchor'></a><a class='srclink' href='../src/syn/ident.rs.html#38-49' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.parse' class="method hidden"><code id='parse.v'>fn <a href='../syn/parse/trait.Parse.html#tymethod.parse' class='fnname'>parse</a>(input: <a class="type" href="../syn/parse/type.ParseStream.html" title="type syn::parse::ParseStream">ParseStream</a>) -&gt; <a class="type" href="../syn/parse/type.Result.html" title="type syn::parse::Result">Result</a>&lt;Self&gt;</code><a class='srclink' href='../src/syn/ident.rs.html#39-48' title='goto source code'>[src]</a></h4></div><h3 id='impl-From%3CSelfValue%3E' class='impl'><code class='in-band'>impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a>&lt;<a class="struct" href="../syn/token/struct.SelfValue.html" title="struct syn::token::SelfValue">SelfValue</a>&gt; for <a class="struct" href="../syn/struct.Ident.html" title="struct syn::Ident">Ident</a></code><a href='#impl-From%3CSelfValue%3E' class='anchor'></a><a class='srclink' href='../src/syn/ident.rs.html#68-72' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.from-1' class="method hidden"><code id='from.v-1'>fn <a href='https://doc.rust-lang.org/nightly/core/convert/trait.From.html#tymethod.from' class='fnname'>from</a>(token: <a class="struct" href="../syn/token/struct.SelfValue.html" title="struct syn::token::SelfValue">SelfValue</a>) -&gt; <a class="struct" href="../syn/struct.Ident.html" title="struct syn::Ident">Ident</a></code><a class='srclink' href='../src/syn/ident.rs.html#69-71' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Performs the conversion.</p>
</div></div><h3 id='impl-From%3CSelfType%3E' class='impl'><code class='in-band'>impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a>&lt;<a class="struct" href="../syn/token/struct.SelfType.html" title="struct syn::token::SelfType">SelfType</a>&gt; for <a class="struct" href="../syn/struct.Ident.html" title="struct syn::Ident">Ident</a></code><a href='#impl-From%3CSelfType%3E' class='anchor'></a><a class='srclink' href='../src/syn/ident.rs.html#68-72' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.from-2' class="method hidden"><code id='from.v-2'>fn <a href='https://doc.rust-lang.org/nightly/core/convert/trait.From.html#tymethod.from' class='fnname'>from</a>(token: <a class="struct" href="../syn/token/struct.SelfType.html" title="struct syn::token::SelfType">SelfType</a>) -&gt; <a class="struct" href="../syn/struct.Ident.html" title="struct syn::Ident">Ident</a></code><a class='srclink' href='../src/syn/ident.rs.html#69-71' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Performs the conversion.</p>
</div></div><h3 id='impl-From%3CSuper%3E' class='impl'><code class='in-band'>impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a>&lt;<a class="struct" href="../syn/token/struct.Super.html" title="struct syn::token::Super">Super</a>&gt; for <a class="struct" href="../syn/struct.Ident.html" title="struct syn::Ident">Ident</a></code><a href='#impl-From%3CSuper%3E' class='anchor'></a><a class='srclink' href='../src/syn/ident.rs.html#68-72' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.from-3' class="method hidden"><code id='from.v-3'>fn <a href='https://doc.rust-lang.org/nightly/core/convert/trait.From.html#tymethod.from' class='fnname'>from</a>(token: <a class="struct" href="../syn/token/struct.Super.html" title="struct syn::token::Super">Super</a>) -&gt; <a class="struct" href="../syn/struct.Ident.html" title="struct syn::Ident">Ident</a></code><a class='srclink' href='../src/syn/ident.rs.html#69-71' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Performs the conversion.</p>
</div></div><h3 id='impl-From%3CCrate%3E' class='impl'><code class='in-band'>impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a>&lt;<a class="struct" href="../syn/token/struct.Crate.html" title="struct syn::token::Crate">Crate</a>&gt; for <a class="struct" href="../syn/struct.Ident.html" title="struct syn::Ident">Ident</a></code><a href='#impl-From%3CCrate%3E' class='anchor'></a><a class='srclink' href='../src/syn/ident.rs.html#68-72' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.from-4' class="method hidden"><code id='from.v-4'>fn <a href='https://doc.rust-lang.org/nightly/core/convert/trait.From.html#tymethod.from' class='fnname'>from</a>(token: <a class="struct" href="../syn/token/struct.Crate.html" title="struct syn::token::Crate">Crate</a>) -&gt; <a class="struct" href="../syn/struct.Ident.html" title="struct syn::Ident">Ident</a></code><a class='srclink' href='../src/syn/ident.rs.html#69-71' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Performs the conversion.</p>
</div></div><h3 id='impl-From%3CExtern%3E' class='impl'><code class='in-band'>impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a>&lt;<a class="struct" href="../syn/token/struct.Extern.html" title="struct syn::token::Extern">Extern</a>&gt; for <a class="struct" href="../syn/struct.Ident.html" title="struct syn::Ident">Ident</a></code><a href='#impl-From%3CExtern%3E' class='anchor'></a><a class='srclink' href='../src/syn/ident.rs.html#68-72' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.from-5' class="method hidden"><code id='from.v-5'>fn <a href='https://doc.rust-lang.org/nightly/core/convert/trait.From.html#tymethod.from' class='fnname'>from</a>(token: <a class="struct" href="../syn/token/struct.Extern.html" title="struct syn::token::Extern">Extern</a>) -&gt; <a class="struct" href="../syn/struct.Ident.html" title="struct syn::Ident">Ident</a></code><a class='srclink' href='../src/syn/ident.rs.html#69-71' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Performs the conversion.</p>
</div></div><h3 id='impl-From%3CUnderscore%3E' class='impl'><code class='in-band'>impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a>&lt;<a class="struct" href="../syn/token/struct.Underscore.html" title="struct syn::token::Underscore">Underscore</a>&gt; for <a class="struct" href="../syn/struct.Ident.html" title="struct syn::Ident">Ident</a></code><a href='#impl-From%3CUnderscore%3E' class='anchor'></a><a class='srclink' href='../src/syn/ident.rs.html#82-86' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.from-6' class="method hidden"><code id='from.v-6'>fn <a href='https://doc.rust-lang.org/nightly/core/convert/trait.From.html#tymethod.from' class='fnname'>from</a>(token: <a class="struct" href="../syn/token/struct.Underscore.html" title="struct syn::token::Underscore">Underscore</a>) -&gt; <a class="struct" href="../syn/struct.Ident.html" title="struct syn::Ident">Ident</a></code><a class='srclink' href='../src/syn/ident.rs.html#83-85' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Performs the conversion.</p>
</div></div><h3 id='impl-From%3CIdent%3E-1' class='impl'><code class='in-band'>impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a>&lt;<a class="struct" href="../syn/struct.Ident.html" title="struct syn::Ident">Ident</a>&gt; for <a class="enum" href="../syn/enum.Meta.html" title="enum syn::Meta">Meta</a></code><a href='#impl-From%3CIdent%3E-1' class='anchor'></a><a class='srclink' href='../src/syn/macros.rs.html#90-94' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.from-7' class="method hidden"><code id='from.v-7'>fn <a href='https://doc.rust-lang.org/nightly/core/convert/trait.From.html#tymethod.from' class='fnname'>from</a>(e: <a class="struct" href="../syn/struct.Ident.html" title="struct syn::Ident">Ident</a>) -&gt; <a class="enum" href="../syn/enum.Meta.html" title="enum syn::Meta">Meta</a></code><a class='srclink' href='../src/syn/macros.rs.html#91-93' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Performs the conversion.</p>
</div></div><h3 id='impl-From%3CIdent%3E-2' class='impl'><code class='in-band'>impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a>&lt;<a class="struct" href="../syn/struct.Ident.html" title="struct syn::Ident">Ident</a>&gt; for <a class="struct" href="../syn/struct.TypeParam.html" title="struct syn::TypeParam">TypeParam</a></code><a href='#impl-From%3CIdent%3E-2' class='anchor'></a><a class='srclink' href='../src/syn/generics.rs.html#360-371' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.from-8' class="method hidden"><code id='from.v-8'>fn <a href='https://doc.rust-lang.org/nightly/core/convert/trait.From.html#tymethod.from' class='fnname'>from</a>(ident: <a class="struct" href="../syn/struct.Ident.html" title="struct syn::Ident">Ident</a>) -&gt; Self</code><a class='srclink' href='../src/syn/generics.rs.html#361-370' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Performs the conversion.</p>
</div></div></div><h2 id='synthetic-implementations' class='small-section-header'>Auto Trait Implementations<a href='#synthetic-implementations' class='anchor'></a></h2><div id='synthetic-implementations-list'><h3 id='impl-Send' class='impl'><code class='in-band'>impl !<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> for <a class="struct" href="../syn/struct.Ident.html" title="struct syn::Ident">Ident</a></code><a href='#impl-Send' class='anchor'></a></h3><div class='impl-items'></div><h3 id='impl-Unpin' class='impl'><code class='in-band'>impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a> for <a class="struct" href="../syn/struct.Ident.html" title="struct syn::Ident">Ident</a></code><a href='#impl-Unpin' class='anchor'></a></h3><div class='impl-items'></div><h3 id='impl-Sync' class='impl'><code class='in-band'>impl !<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a> for <a class="struct" href="../syn/struct.Ident.html" title="struct syn::Ident">Ident</a></code><a href='#impl-Sync' class='anchor'></a></h3><div class='impl-items'></div><h3 id='impl-UnwindSafe' class='impl'><code class='in-band'>impl <a class="trait" href="https://doc.rust-lang.org/nightly/std/panic/trait.UnwindSafe.html" title="trait std::panic::UnwindSafe">UnwindSafe</a> for <a class="struct" href="../syn/struct.Ident.html" title="struct syn::Ident">Ident</a></code><a href='#impl-UnwindSafe' class='anchor'></a></h3><div class='impl-items'></div><h3 id='impl-RefUnwindSafe' class='impl'><code class='in-band'>impl !<a class="trait" href="https://doc.rust-lang.org/nightly/std/panic/trait.RefUnwindSafe.html" title="trait std::panic::RefUnwindSafe">RefUnwindSafe</a> for <a class="struct" href="../syn/struct.Ident.html" title="struct syn::Ident">Ident</a></code><a href='#impl-RefUnwindSafe' class='anchor'></a></h3><div class='impl-items'></div></div><h2 id='blanket-implementations' class='small-section-header'>Blanket Implementations<a href='#blanket-implementations' class='anchor'></a></h2><div id='blanket-implementations-list'><h3 id='impl-Token-1' class='impl'><code class='in-band'>impl&lt;T&gt; <a class="trait" href="../syn/token/trait.Token.html" title="trait syn::token::Token">Token</a> for T <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: CustomToken,&nbsp;</span></code><a href='#impl-Token-1' class='anchor'></a><a class='srclink' href='../src/syn/token.rs.html#223-231' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.peek-1' class="method hidden"><code id='peek.v-1'>fn <a href='../syn/token/trait.Token.html#tymethod.peek' class='fnname'>peek</a>(<a class="struct" href="../syn/buffer/struct.Cursor.html" title="struct syn::buffer::Cursor">Cursor</a>) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code><a class='srclink' href='../src/syn/token.rs.html#224-226' title='goto source code'>[src]</a></h4><h4 id='method.display-1' class="method hidden"><code id='display.v-1'>fn <a href='../syn/token/trait.Token.html#tymethod.display' class='fnname'>display</a>() -&gt; &amp;'static <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a></code><a class='srclink' href='../src/syn/token.rs.html#228-230' title='goto source code'>[src]</a></h4></div><h3 id='impl-Spanned' class='impl'><code class='in-band'>impl&lt;T&gt; <a class="trait" href="../syn/spanned/trait.Spanned.html" title="trait syn::spanned::Spanned">Spanned</a> for T <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: <a class="trait" href="../quote/to_tokens/trait.ToTokens.html" title="trait quote::to_tokens::ToTokens">ToTokens</a>,&nbsp;</span></code><a href='#impl-Spanned' class='anchor'></a><a class='srclink' href='../src/syn/spanned.rs.html#99-106' title='goto source code'>[src]</a></h3><div class='impl-items'><
</div></div><h3 id='impl-ToOwned' class='impl'><code class='in-band'>impl&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/alloc/borrow/trait.ToOwned.html" title="trait alloc::borrow::ToOwned">ToOwned</a> for T <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: <a class="trait" href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a>,&nbsp;</span></code><a href='#impl-ToOwned' class='anchor'></a><a class='srclink' href='https://doc.rust-lang.org/nightly/src/alloc/borrow.rs.html#81-92' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='associatedtype.Owned' class="type"><code id='Owned.t'>type <a href='https://doc.rust-lang.org/nightly/alloc/borrow/trait.ToOwned.html#associatedtype.Owned' class="type">Owned</a> = T</code></h4><div class='docblock'><p>The resulting type after obtaining ownership.</p>
</div><h4 id='method.to_owned' class="method hidden"><code id='to_owned.v'>fn <a href='https://doc.rust-lang.org/nightly/alloc/borrow/trait.ToOwned.html#tymethod.to_owned' class='fnname'>to_owned</a>(&amp;self) -&gt; T</code><a class='srclink' href='https://doc.rust-lang.org/nightly/src/alloc/borrow.rs.html#85-87' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Creates owned data from borrowed data, usually by cloning. <a href="https://doc.rust-lang.org/nightly/alloc/borrow/trait.ToOwned.html#tymethod.to_owned">Read more</a></p>
</div><h4 id='method.clone_into' class="method hidden"><code id='clone_into.v'>fn <a href='https://doc.rust-lang.org/nightly/alloc/borrow/trait.ToOwned.html#method.clone_into' class='fnname'>clone_into</a>(&amp;self, target: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;mut </a>T)</code><a class='srclink' href='https://doc.rust-lang.org/nightly/src/alloc/borrow.rs.html#89-91' title='goto source code'>[src]</a></h4><div class='stability hidden'><div class='stab unstable'><details><summary><span class='emoji'>🔬</span> This is a nightly-only experimental API. (<code>toowned_clone_into</code>)</summary><p>recently added</p>
</details></div></div><div class='docblock hidden'><p>Uses borrowed data to replace owned data, usually by cloning. <a href="https://doc.rust-lang.org/nightly/alloc/borrow/trait.ToOwned.html#method.clone_into">Read more</a></p>
</div></div><h3 id='impl-Into%3CU%3E' class='impl'><code class='in-band'>impl&lt;T, U&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a>&lt;U&gt; for T <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;U: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a>&lt;T&gt;,&nbsp;</span></code><a href='#impl-Into%3CU%3E' class='anchor'></a><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/convert.rs.html#544-549' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.into' class="method hidden"><code id='into.v'>fn <a href='https://doc.rust-lang.org/nightly/core/convert/trait.Into.html#tymethod.into' class='fnname'>into</a>(self) -&gt; U</code><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/convert.rs.html#546-548' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Performs the conversion.</p>
</div></div><h3 id='impl-From%3CT%3E' class='impl'><code class='in-band'>impl&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a>&lt;T&gt; for T</code><a href='#impl-From%3CT%3E' class='anchor'></a><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/convert.rs.html#553-555' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.from-9' class="method hidden"><code id='from.v-9'>fn <a href='https://doc.rust-lang.org/nightly/core/convert/trait.From.html#tymethod.from' class='fnname'>from</a>(t: T) -&gt; T</code><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/convert.rs.html#554' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Performs the conversion.</p>
</div></div><h3 id='impl-ToString' class='impl'><code class='in-band'>impl&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/alloc/string/trait.ToString.html" title="trait alloc::string::ToString">ToString</a> for T <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: <a class="trait" href="https://doc.rust-lang.org/nightly/core/fmt/trait.Display.html" title="trait core::fmt::Display">Display</a> + ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,&nbsp;</span></code><a href='#impl-ToString' class='anchor'></a><a class='srclink' href='https://doc.rust-lang.org/nightly/src/alloc/string.rs.html#2134-2144' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.to_string' class="method hidden"><code id='to_string.v'>default fn <a href='https://doc.rust-lang.org/nightly/alloc/string/trait.ToString.html#tymethod.to_string' class='fnname'>to_string</a>(&amp;self) -&gt; <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/string/struct.String.html" title="struct alloc::string::String">String</a></code><a class='srclink' href='https://doc.rust-lang.org/nightly/src/alloc/string.rs.html#2136-2143' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Converts the given value to a <code>String</code>. <a href="https://doc.rust-lang.org/nightly/alloc/string/trait.ToString.html#tymethod.to_string">Read more</a></p>
</div></div><h3 id='impl-TryFrom%3CU%3E' class='impl'><code class='in-band'>impl&lt;T, U&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a>&lt;U&gt; for T <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;U: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a>&lt;T&gt;,&nbsp;</span></code><a href='#impl-TryFrom%3CU%3E' class='anchor'></a><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/convert.rs.html#572-578' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='associatedtype.Error' class="type"><code id='Error.t'>type <a href='https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#associatedtype.Error' class="type">Error</a> = <a class="enum" href="https://doc.rust-lang.org/nightly/core/convert/enum.Infallible.html" title="enum core::convert::Infallible">Infallible</a></code></h4><div class='docblock'><p>The type returned in the event of a conversion error.</p>
</div><h4 id='method.try_from' class="method hidden"><code id='try_from.v'>fn <a href='https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#tymethod.try_from' class='fnname'>try_from</a>(value: U) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;T, &lt;T as <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a>&lt;U&gt;&gt;::<a class="type" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a>&gt;</code><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/convert.rs.html#575-577' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Performs the conversion.</p>
</div></div><h3 id='impl-TryInto%3CU%3E' class='impl'><code class='in-band'>impl&lt;T, U&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryInto.html" title="trait core::convert::TryInto">TryInto</a>&lt;U&gt; for T <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;U: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a>&lt;T&gt;,&nbsp;</span></code><a href='#impl-TryInto%3CU%3E' class='anchor'></a><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/convert.rs.html#560-567' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='associatedtype.Error-1' class="type"><code id='Error.t-1'>type <a href='https://doc.rust-lang.org/nightly/core/convert/trait.TryInto.html#associatedtype.Error' class="type">Error</a> = &lt;U as <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a>&lt;T&gt;&gt;::<a class="type" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a></code></h4><div class='docblock'><p>The type returned in the event of a conversion error.</p>
</div><h4 id='method.try_into' class="method hidden"><code id='try_into.v'>fn <a href='https://doc.rust-lang.org/nightly/core/convert/trait.TryInto.html#tymethod.try_into' class='fnname'>try_into</a>(self) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;U, &lt;U as <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a>&lt;T&gt;&gt;::<a class="type" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a>&gt;</code><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/convert.rs.html#564-566' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Performs the conversion.</p>
</div></div><h3 id='impl-BorrowMut%3CT%3E' class='impl'><code class='in-band'>impl&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html" title="trait core::borrow::BorrowMut">BorrowMut</a>&lt;T&gt; for T <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,&nbsp;</span></code><a href='#impl-BorrowMut%3CT%3E' class='anchor'></a><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#218-220' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.borrow_mut' class="method hidden"><code id='borrow_mut.v'>fn <a href='https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut' class='fnname'>borrow_mut</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;mut </a>T</code><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#219' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Mutably borrows from an owned value. <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut">Read more</a></p>
</div></div><h3 id='impl-Borrow%3CT%3E' class='impl'><code class='in-band'>impl&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html" title="trait core::borrow::Borrow">Borrow</a>&lt;T&gt; for T <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,&nbsp;</span></code><a href='#impl-Borrow%3CT%3E' class='anchor'></a><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#213-215' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.borrow' class="method hidden"><code id='borrow.v'>fn <a href='https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html#tymethod.borrow' class='fnname'>borrow</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>T</code><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#214' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Immutably borrows from an owned value. <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html#tymethod.borrow">Read more</a></p>
</div></div><h3 id='impl-Any' class='impl'><code class='in-band'>impl&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html" title="trait core::any::Any">Any</a> for T <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: 'static + ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,&nbsp;</span></code><a href='#impl-Any' class='anchor'></a><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/any.rs.html#100-102' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.type_id' class="method hidden"><code id='type_id.v'>fn <a href='https://doc.rust-lang.org/nightly/core/any/trait.Any.html#tymethod.type_id' class='fnname'>type_id</a>(&amp;self) -&gt; <a class="struct" href="https://doc.rust-lang.org/nightly/core/any/struct.TypeId.html" title="struct core::any::TypeId">TypeId</a></code><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/any.rs.html#101' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Gets the <code>TypeId</code> of <code>self</code>. <a href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html#tymethod.type_id">Read more</a></p>
</div></div></div></section><section id="search" class="content hidden"></section><section class="footer"></section><aside id="help" class="hidden"><div><h1 class="hidden">Help</h1><div class="shortcuts"><h2>Keyboard Shortcuts</h2><dl><dt><kbd>?</kbd></dt><dd>Show this help dialog</dd><dt><kbd>S</kbd></dt><dd>Focus the search field</dd><dt><kbd></kbd></dt><dd>Move up in search results</dd><dt><kbd></kbd></dt><dd>Move down in search results</dd><dt><kbd></kbd></dt><dd>Switch tab</dd><dt><kbd>&#9166;</kbd></dt><dd>Go to active search result</dd><dt><kbd>+</kbd></dt><dd>Expand all sections</dd><dt><kbd>-</kbd></dt><dd>Collapse all sections</dd></dl></div><div class="infos"><h2>Search Tricks</h2><p>Prefix searches with a type followed by a colon (e.g., <code>fn:</code>) to restrict the search to a given type.</p><p>Accepted types are: <code>fn</code>, <code>mod</code>, <code>struct</code>, <code>enum</code>, <code>trait</code>, <code>type</code>, <code>macro</code>, and <code>const</code>.</p><p>Search functions by type signature (e.g., <code>vec -> usize</code> or <code>* -> vec</code>)</p><p>Search multiple things at once by splitting your query with comma (e.g., <code>str,u8</code> or <code>String,struct:Vec,test</code>)</p></div></div></aside><script>window.rootPath = "../";window.currentCrate = "syn";</script><script src="../aliases.js"></script><script src="../main.js"></script><script defer src="../search-index.js"></script></body></html>