15 lines
24 KiB
HTML
15 lines
24 KiB
HTML
|
<!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 `IdentFragment` trait in crate `quote`."><meta name="keywords" content="rust, rustlang, rust-lang, IdentFragment"><title>quote::IdentFragment - 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="../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../ayu.css" disabled ><script id="default-settings"></script><script src="../storage.js"></script><noscript><link rel="stylesheet" href="../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../favicon.svg">
|
|||
|
<link rel="alternate icon" type="image/png" href="../favicon-16x16.png">
|
|||
|
<link rel="alternate icon" type="image/png" href="../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../down-arrow.svg");}</style></head><body class="rustdoc trait"><!--[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">☰</div><a href='../quote/index.html'><div class='logo-container rust-logo'><img src='../rust-logo.png' alt='logo'></div></a><p class="location">Trait IdentFragment</p><div class="sidebar-elems"><div class="block items"><a class="sidebar-title" href="#required-methods">Required Methods</a><div class="sidebar-links"><a href="#tymethod.fmt">fmt</a></div><a class="sidebar-title" href="#provided-methods">Provided Methods</a><div class="sidebar-links"><a href="#method.span">span</a></div><a class="sidebar-title" href="#foreign-impls">Implementations on Foreign Types</a><div class="sidebar-links"><a href="#impl-IdentFragment-for-%26%27_%20T">&'_ T</a><a href="#impl-IdentFragment-for-%26%27_%20mut%20T">&'_ mut T</a><a href="#impl-IdentFragment-for-Cow%3C%27_%2C%20T%3E">Cow<'_, T></a><a href="#impl-IdentFragment-for-Ident">Ident</a><a href="#impl-IdentFragment-for-String">String</a><a href="#impl-IdentFragment-for-bool">bool</a><a href="#impl-IdentFragment-for-char">char</a><a href="#impl-IdentFragment-for-str">str</a><a href="#impl-IdentFragment-for-u128">u128</a><a href="#impl-IdentFragment-for-u16">u16</a><a href="#impl-IdentFragment-for-u32">u32</a><a href="#impl-IdentFragment-for-u64">u64</a><a href="#impl-IdentFragment-for-u8">u8</a><a href="#impl-IdentFragment-for-usize">usize</a></div><a class="sidebar-title" href="#implementors">Implementors</a></div><p class="location"><a href="index.html">quote</a></p><script>window.sidebarCurrent = {name: "IdentFragment", ty: "trait", relpath: ""};</script><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu"><img src="../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><script src="../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><span class="help-button">?</span>
|
|||
|
<a id="settings-menu" href="../settings.html"><img src="../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span><a class="srclink" href="../src/quote/ident_fragment.rs.html#11-21" title="goto source code">[src]</a></span><span class="in-band">Trait <a href="index.html">quote</a>::<wbr><a class="trait" href="">IdentFragment</a></span></h1><div class="docblock type-decl hidden-by-usual-hider"><pre class="rust trait">pub trait IdentFragment {
|
|||
|
fn <a href="#tymethod.fmt" class="fnname">fmt</a>(&self, f: &mut <a class="struct" href="https://doc.rust-lang.org/nightly/core/fmt/struct.Formatter.html" title="struct core::fmt::Formatter">Formatter</a><'_>) -> <a class="type" href="https://doc.rust-lang.org/nightly/core/fmt/type.Result.html" title="type core::fmt::Result">Result</a>;
|
|||
|
|
|||
|
fn <a href="#method.span" class="fnname">span</a>(&self) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="struct" href="../proc_macro2/struct.Span.html" title="struct proc_macro2::Span">Span</a>> { ... }
|
|||
|
}</pre></div><div class="docblock"><p>Specialized formatting trait used by <code>format_ident!</code>.</p>
|
|||
|
<p><a href="../proc_macro2/struct.Ident.html" title="Ident"><code>Ident</code></a> arguments formatted using this trait will have their <code>r#</code> prefix
|
|||
|
stripped, if present.</p>
|
|||
|
<p>See <a href="../quote/macro.format_ident.html" title="format_ident!"><code>format_ident!</code></a> for more information.</p>
|
|||
|
</div><h2 id="required-methods" class="small-section-header">Required methods<a href="#required-methods" class="anchor"></a></h2><div class="methods"><h3 id="tymethod.fmt" class="method"><code>fn <a href="#tymethod.fmt" class="fnname">fmt</a>(&self, f: &mut <a class="struct" href="https://doc.rust-lang.org/nightly/core/fmt/struct.Formatter.html" title="struct core::fmt::Formatter">Formatter</a><'_>) -> <a class="type" href="https://doc.rust-lang.org/nightly/core/fmt/type.Result.html" title="type core::fmt::Result">Result</a></code></h3><div class="docblock"><p>Format this value as an identifier fragment.</p>
|
|||
|
</div></div><span class="loading-content">Loading content...</span><h2 id="provided-methods" class="small-section-header">Provided methods<a href="#provided-methods" class="anchor"></a></h2><div class="methods"><h3 id="method.span" class="method"><code>fn <a href="#method.span" class="fnname">span</a>(&self) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="struct" href="../proc_macro2/struct.Span.html" title="struct proc_macro2::Span">Span</a>></code></h3><div class="docblock"><p>Span associated with this <code>IdentFragment</code>.</p>
|
|||
|
<p>If non-<code>None</code>, may be inherited by formatted identifiers.</p>
|
|||
|
</div></div><span class="loading-content">Loading content...</span><h2 id="foreign-impls" class="small-section-header">Implementations on Foreign Types<a href="#foreign-impls" class="anchor"></a></h2><h3 id="impl-IdentFragment-for-%26%27_%20T" class="impl"><code class="in-band">impl<T: <a class="trait" href="../quote/trait.IdentFragment.html" title="trait quote::IdentFragment">IdentFragment</a> + ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, '_> <a class="trait" href="../quote/trait.IdentFragment.html" title="trait quote::IdentFragment">IdentFragment</a> for <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&'_ </a>T</code><a href="#impl-IdentFragment-for-%26%27_%20T" class="anchor"></a><a class="srclink" href="../src/quote/ident_fragment.rs.html#23-31" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.span-1" class="method hidden"><code>fn <a href="#method.span" class="fnname">span</a>(&self) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="struct" href="../proc_macro2/struct.Span.html" title="struct proc_macro2::Span">Span</a>></code><a class="srclink" href="../src/quote/ident_fragment.rs.html#24-26" title="goto source code">[src]</a></h4><h4 id="method.fmt" class="method hidden"><code>fn <a href="#method.fmt" class="fnname">fmt</a>(&self, f: &mut <a class="struct" href="https://doc.rust-lang.org/nightly/core/fmt/struct.Formatter.html" title="struct core::fmt::Formatter">Formatter</a><'_>) -> <a class="type" href="https://doc.rust-lang.org/nightly/core/fmt/type.Result.html" title="type core::fmt::Result">Result</a></code><a class="srclink" href="../src/quote/ident_fragment.rs.html#28-30" title="goto source code">[src]</a></h4></div><h3 id="impl-IdentFragment-for-%26%27_%20mut%20T" class="impl"><code class="in-band">impl<T: <a class="trait" href="../quote/trait.IdentFragment.html" title="trait quote::IdentFragment">IdentFragment</a> + ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, '_> <a class="trait" href="../quote/trait.IdentFragment.html" title="trait quote::IdentFragment">IdentFragment</a> for <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&'_ mut </a>T</code><a href="#impl-IdentFragment-for-%26%27_%20mut%20T" class="anchor"></a><a class="srclink" href="../src/quote/ident_fragment.rs.html#33-41" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.span-2" class="method hidden"><code>fn <a href="#method.span" class="fnname">span</a>(&self) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="struct" href="../proc_macro2/struct.Span.html" title="struct proc_macro2::Span">Span</a>></code><a class="srclink" href="../src/quote/ident_fragment.rs.html#34-36" title="goto source code">[src]</a></h4><h4 id="method.fmt-1" class="method hidden"><code>fn <a href="#method.fmt" class="fnname">fmt</a>(&self, f: &mut <a class="struct" href="https://doc.rust-lang.org/nightly/core/fmt/struct.Formatter.html" title="struct core::fmt::Formatter">Formatter</a><'_>) -> <a class="type" href="https://doc.rust-lang.org/nightly/core/fmt/type.Result.html" title="type core::fmt::Result">Result</a></code><a class="srclink" href="../src/quote/ident_fragment.rs.html#38-40" title="goto source code">[src]</a></h4></div><h3 id="impl-IdentFragment-for-Ident" class="impl"><code class="in-band">impl <a class="trait" href="../quote/trait.IdentFragment.html" title="trait quote::IdentFragment">IdentFragment</a> for <a class="struct" href="../proc_macro2/struct.Ident.html" title="struct proc_macro2::Ident">Ident</a></code><a href="#impl-IdentFragment-for-Ident" class="anchor"></a><
|