mcquery-rs/doc/syn/parse/trait.Parse.html

10 lines
212 KiB
HTML
Raw Normal View History

2021-01-08 20:01:01 +01:00
<!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 `Parse` trait in crate `syn`."><meta name="keywords" content="rust, rustlang, rust-lang, Parse"><title>syn::parse::Parse - 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">&#9776;</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 Parse</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.parse">parse</a></div><a class="sidebar-title" href="#foreign-impls">Implementations on Foreign Types</a><div class="sidebar-links"><a href="#impl-Parse-for-Box%3CT%3E">Box&lt;T&gt;</a><a href="#impl-Parse-for-Group">Group</a><a href="#impl-Parse-for-Literal">Literal</a><a href="#impl-Parse-for-Option%3CAbi%3E">Option&lt;Abi&gt;</a><a href="#impl-Parse-for-Option%3CBoundLifetimes%3E">Option&lt;BoundLifetimes&gt;</a><a href="#impl-Parse-for-Option%3CLabel%3E">Option&lt;Label&gt;</a><a href="#impl-Parse-for-Option%3CT%3E">Option&lt;T&gt;</a><a href="#impl-Parse-for-Option%3CWhereClause%3E">Option&lt;WhereClause&gt;</a><a href="#impl-Parse-for-Punct">Punct</a><a href="#impl-Parse-for-TokenStream">TokenStream</a><a href="#impl-Parse-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">parse</a></p><script>window.sidebarCurrent = {name: "Parse", 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">&#x2212;</span>]</a></span><a class="srclink" href="../../src/syn/parse.rs.html#218-220" title="goto source code">[src]</a></span><span class="in-band">Trait <a href="../index.html">syn</a>::<wbr><a href="index.html">parse</a>::<wbr><a class="trait" href="">Parse</a></span></h1><div class="docblock type-decl hidden-by-usual-hider"><pre class="rust trait">pub trait Parse: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a> {
fn <a href="#tymethod.parse" class="fnname">parse</a>(input: <a class="type" href="../../syn/parse/type.ParseStream.html" title="type syn::parse::ParseStream">ParseStream</a>&lt;'_&gt;) -&gt; <a class="type" href="../../syn/parse/type.Result.html" title="type syn::parse::Result">Result</a>&lt;Self&gt;;
}</pre></div><div class="docblock"><p>Parsing interface implemented by all types that can be parsed in a default
way from a token stream.</p>
<p>Refer to the <a href="../../syn/parse/index.html">module documentation</a> for details about implementing and using
the <code>Parse</code> trait.</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.parse" class="method"><code>fn <a href="#tymethod.parse" class="fnname">parse</a>(input: <a class="type" href="../../syn/parse/type.ParseStream.html" title="type syn::parse::ParseStream">ParseStream</a>&lt;'_&gt;) -&gt; <a class="type" href="../../syn/parse/type.Result.html" title="type syn::parse::Result">Result</a>&lt;Self&gt;</code></h3></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-Parse-for-Option%3CLabel%3E" 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="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;<a class="struct" href="../../syn/struct.Label.html" title="struct syn::Label">Label</a>&gt;</code><a href="#impl-Parse-for-Option%3CLabel%3E" class="anchor"></a><a class="srclink" href="../../src/syn/expr.rs.html#2349-2357" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.parse" class="method hidden"><code>fn <a href="#method.parse" class="fnname">parse</a>(input: <a class="type" href="../../syn/parse/type.ParseStream.html" title="type syn::parse::ParseStream">ParseStream</a>&lt;'_&gt;) -&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/expr.rs.html#2350-2356" title="goto source code">[src]</a></h4></div><h3 id="impl-Parse-for-Option%3CBoundLifetimes%3E" 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="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;<a class="struct" href="../../syn/struct.BoundLifetimes.html" title="struct syn::BoundLifetimes">BoundLifetimes</a>&gt;</code><a href="#impl-Parse-for-Option%3CBoundLifetimes%3E" class="anchor"></a><a class="srclink" href="../../src/syn/generics.rs.html#745-753" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.parse-1" class="method hidden"><code>fn <a href="#method.parse" class="fnname">parse</a>(input: <a class="type" href="../../syn/parse/type.ParseStream.html" title="type syn::parse::ParseStream">ParseStream</a>&lt;'_&gt;) -&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/generics.rs.html#746-752" title="goto source code">[src]</a></h4></div><h3 id="impl-Parse-for-Option%3CWhereClause%3E" 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="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;<a class="struct" href="../../syn/struct.WhereClause.html" title="struct syn::WhereClause">WhereClause</a>&gt;</code><a href="#impl-Parse-for-Option%3CWhereClause%3E" class="anchor"></a><a class="srclink" href="../../src/syn/generics.rs.html#916-924" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.parse-2" class="method hidden"><code>fn <a href="#method.parse" class="fnname">parse</a>(input: <a class="type" href="../../syn/parse/type.ParseStream.html" title="type syn::parse::ParseStream">ParseStream</a>&lt;'_&gt;) -&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/generics.rs.html#917-923" title="goto source code">[src]</a></h4></div><h3 id="impl-Parse-for-Option%3CAbi%3E" class="impl"><code class="in-band">impl <a class=