6 lines
135 KiB
HTML
6 lines
135 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 `Token` trait in crate `syn`."><meta name="keywords" content="rust, rustlang, rust-lang, Token"><title>syn::token::Token - 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='../../syn/index.html'><div class='logo-container rust-logo'><img src='../../rust-logo.png' alt='logo'></div></a><p class="location">Trait Token</p><div class="sidebar-elems"><div class="block items"><a class="sidebar-title" href="#foreign-impls">Implementations on Foreign Types</a><div class="sidebar-links"><a href="#impl-Token-for-Group">Group</a><a href="#impl-Token-for-Literal">Literal</a><a href="#impl-Token-for-Punct">Punct</a><a href="#impl-Token-for-TokenTree">TokenTree</a></div><a class="sidebar-title" href="#implementors">Implementors</a></div><p class="location"><a href="../index.html">syn</a>::<wbr><a href="index.html">token</a></p><script>window.sidebarCurrent = {name: "Token", 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/syn/token.rs.html#126-134" title="goto source code">[src]</a></span><span class="in-band">Trait <a href="../index.html">syn</a>::<wbr><a href="index.html">token</a>::<wbr><a class="trait" href="">Token</a></span></h1><div class="docblock type-decl hidden-by-usual-hider"><pre class="rust trait">pub trait Token: Sealed { }</pre></div><div class="docblock"><p>Marker trait for types that represent single tokens.</p>
|
|||
|
<p>This trait is sealed and cannot be implemented for types outside of Syn.</p>
|
|||
|
</div><h2 id="foreign-impls" class="small-section-header">Implementations on Foreign Types<a href="#foreign-impls" class="anchor"></a></h2><h3 id="impl-Token-for-Group" 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="../../proc_macro2/struct.Group.html" title="struct proc_macro2::Group">Group</a></code><a href="#impl-Token-for-Group" class="anchor"></a><a class="srclink" href="../../src/syn/token.rs.html#195" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.peek" class="method hidden"><code>fn <a href="#method.peek" class="fnname">peek</a>(cursor: <a class="struct" href="../../syn/buffer/struct.Cursor.html" title="struct syn::buffer::Cursor">Cursor</a><'_>) -> <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#195" title="goto source code">[src]</a></h4><h4 id="method.display" class="method hidden"><code>fn <a href="#method.display" class="fnname">display</a>() -> &'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#195" title="goto source code">[src]</a></h4></div><h3 id="impl-Token-for-Punct" 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="../../proc_macro2/struct.Punct.html" title="struct proc_macro2::Punct">Punct</a></code><a href="#impl-Token-for-Punct" class="anchor"></a><a class="srclink" href="../../src/syn/token.rs.html#215" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.peek-1" class="method hidden"><code>fn <a href="#method.peek" class="fnname">peek</a>(cursor: <a class="struct" href="../../syn/buffer/struct.Cursor.html" title="struct syn::buffer::Cursor">Cursor</a><'_>) -> <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#215" title="goto source code">[src]</a></h4><h4 id="method.display-1" class="method hidden"><code>fn <a href="#method.display" class="fnname">display</a>() -> &'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#215" title="goto source code">[src]</a></h4></div><h3 id="impl-Token-for-Literal" 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="../../proc_macro2/struct.Literal.html" title="struct proc_macro2::Literal">Literal</a></code><a href="#impl-Token-for-Literal" class="anchor"></a><a class="srclink" href="../../src/syn/token.rs.html#216" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.peek-2" class="method hidden"><code>fn <a href="#method.peek" class="fnname">peek</a>(cursor: <a class="struct" href="../../syn/buffer/struct.Cursor.html" title="struct syn::buffer::Cursor">Cursor</a><'_>) -> <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#216" title="goto source code">[src]</a></h4><h4 id="method.display-2" class="method hidden"><code>fn <a href="#method.display" class="fnname">display</a>() -> &'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#216" title="goto source code">[src]</a></h4></div><h3 id="impl-Token-for-TokenTree" 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="enum" href="../../proc_macro2/enum.TokenTree.html" title="enum proc_macro2::TokenTree">TokenTree</a></c
|