298 lines
66 KiB
HTML
298 lines
66 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 `Punctuated` struct in crate `syn`.">
|
|||
|
<meta name="keywords" content="rust, rustlang, rust-lang, Punctuated">
|
|||
|
|
|||
|
<title>syn::punctuated::Punctuated - 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="../../main.css" id="themeStyle">
|
|||
|
<script src="../../storage.js"></script>
|
|||
|
|
|||
|
|
|||
|
|
|||
|
|
|||
|
</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">☰</div>
|
|||
|
|
|||
|
<p class='location'>Struct Punctuated</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.is_empty">is_empty</a><a href="#method.len">len</a><a href="#method.first">first</a><a href="#method.last">last</a><a href="#method.last_mut">last_mut</a><a href="#method.iter">iter</a><a href="#method.iter_mut">iter_mut</a><a href="#method.pairs">pairs</a><a href="#method.pairs_mut">pairs_mut</a><a href="#method.into_pairs">into_pairs</a><a href="#method.push_value">push_value</a><a href="#method.push_punct">push_punct</a><a href="#method.pop">pop</a><a href="#method.trailing_punct">trailing_punct</a><a href="#method.empty_or_trailing">empty_or_trailing</a><a href="#method.push">push</a><a href="#method.insert">insert</a><a href="#method.parse_separated">parse_separated</a><a href="#method.parse_separated_nonempty">parse_separated_nonempty</a><a href="#method.parse_terminated">parse_terminated</a><a href="#method.parse_terminated_nonempty">parse_terminated_nonempty</a><a href="#method.parse_separated_with">parse_separated_with</a><a href="#method.parse_separated_nonempty_with">parse_separated_nonempty_with</a><a href="#method.parse_terminated_with">parse_terminated_with</a><a href="#method.parse_terminated_nonempty_with">parse_terminated_nonempty_with</a></div><a class="sidebar-title" href="#implementations">Trait Implementations</a><div class="sidebar-links"><a href="#impl-ToTokens">ToTokens</a><a href="#impl-Eq">Eq</a><a href="#impl-PartialEq">PartialEq</a><a href="#impl-Hash">Hash</a><a href="#impl-Clone">Clone</a><a href="#impl-Debug">Debug</a><a href="#impl-FromIterator%3CT%3E">FromIterator<T></a><a href="#impl-Extend%3CT%3E">Extend<T></a><a href="#impl-FromIterator%3CPair%3CT%2C%20P%3E%3E">FromIterator<Pair<T, P>></a><a href="#impl-Extend%3CPair%3CT%2C%20P%3E%3E">Extend<Pair<T, P>></a><a href="#impl-IntoIterator">IntoIterator</a><a href="#impl-Default">Default</a><a href="#impl-Index%3Cusize%3E">Index<usize></a><a href="#impl-IndexMut%3Cusize%3E">IndexMut<usize></a></div></div><p class='location'><a href='../index.html'>syn</a>::<wbr><a href='index.html'>punctuated</a></p><script>window.sidebarCurrent = {name: 'Punctuated', 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">
|
|||
|
<input class="search-input" name="search"
|
|||
|
autocomplete="off"
|
|||
|
placeholder="Click or press ‘S’ to search, ‘?’ for more options…"
|
|||
|
type="search">
|
|||
|
</div>
|
|||
|
</form>
|
|||
|
</nav>
|
|||
|
|
|||
|
<section id='main' class="content">
|
|||
|
<h1 class='fqn'><span class='in-band'>Struct <a href='../index.html'>syn</a>::<wbr><a href='index.html'>punctuated</a>::<wbr><a class="struct" href=''>Punctuated</a></span><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/punctuated.rs.html#55-58' title='goto source code'>[src]</a></span></h1>
|
|||
|
<pre class='rust struct'>pub struct Punctuated<T, P> { /* fields omitted */ }</pre><div class='docblock'><p>A punctuated sequence of syntax tree nodes of type <code>T</code> separated by
|
|||
|
punctuation of type <code>P</code>.</p>
|
|||
|
<p>Refer to the <a href="index.html">module documentation</a> for details about punctuated sequences.</p>
|
|||
|
</div>
|
|||
|
<h2 id='methods' class='small-section-header'>
|
|||
|
Methods<a href='#methods' class='anchor'></a>
|
|||
|
</h2>
|
|||
|
<h3 id='impl' class='impl'><span class='in-band'><code>impl<T, P> <a class="struct" href="../../syn/punctuated/struct.Punctuated.html" title="struct syn::punctuated::Punctuated">Punctuated</a><T, P></code><a href='#impl' class='anchor'></a></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/syn/punctuated.rs.html#60-211' title='goto source code'>[src]</a></span></h3>
|
|||
|
<div class='impl-items'><h4 id='method.new' class="method"><span id='new.v' class='invisible'><code>pub fn <a href='#method.new' class='fnname'>new</a>() -> <a class="struct" href="../../syn/punctuated/struct.Punctuated.html" title="struct syn::punctuated::Punctuated">Punctuated</a><T, P></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/syn/punctuated.rs.html#62-67' title='goto source code'>[src]</a></span></h4>
|
|||
|
<div class='docblock'><p>Creates an empty punctuated sequence.</p>
|
|||
|
</div><h4 id='method.is_empty' class="method"><span id='is_empty.v' class='invisible'><code>pub fn <a href='#method.is_empty' class='fnname'>is_empty</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/syn/punctuated.rs.html#71-73' title='goto source code'>[src]</a></span></h4>
|
|||
|
<div class='docblock'><p>Determines whether this punctuated sequence is empty, meaning it
|
|||
|
contains no syntax tree nodes or punctuation.</p>
|
|||
|
</div><h4 id='method.len' class="method"><span id='len.v' class='invisible'><code>pub fn <a href='#method.len' class='fnname'>len</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/syn/punctuated.rs.html#79-81' title='goto source code'>[src]</a></span></h4>
|
|||
|
<div class='docblock'><p>Returns the number of syntax tree nodes in this punctuated sequence.</p>
|
|||
|
<p>This is the number of nodes of type <code>T</code>, not counting the punctuation of
|
|||
|
type <code>P</code>.</p>
|
|||
|
</div><h4 id='method.first' class="method"><span id='first.v' class='invisible'><code>pub fn <a href='#method.first' class='fnname'>first</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="enum" href="../../syn/punctuated/enum.Pair.html" title="enum syn::punctuated::Pair">Pair</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&</a>T, <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&</a>P>></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/syn/punctuated.rs.html#84-86' title='goto source code'>[src]</a></span></h4>
|
|||
|
<div class='docblock'><p>Borrows the first punctuated pair in this sequence.</p>
|
|||
|
</div><h4 id='method.last' class="method"><span id='last.v' class='invisible'><code>pub fn <a href='#method.last' class='fnname'>last</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="enum" href="../../syn/punctuated/enum.Pair.html" title="enum syn::punctuated::Pair">Pair</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&</a>T, <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&</a>P>></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/syn/punctuated.rs.html#89-97' title='goto source code'>[src]</a></span></h4>
|
|||
|
<div class='docblock'><p>Borrows the last punctuated pair in this sequence.</p>
|
|||
|
</div><h4 id='method.last_mut' class="method"><span id='last_mut.v' class='invisible'><code>pub fn <a href='#method.last_mut' class='fnname'>last_mut</a>(&mut 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="enum" href="../../syn/punctuated/enum.Pair.html" title="enum syn::punctuated::Pair">Pair</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&mut </a>T, <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&mut </a>P>></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/syn/punctuated.rs.html#100-108' title='goto source code'>[src]</a></span></h4>
|
|||
|
<div class='docblock'><p>Mutably borrows the last punctuated pair in this sequence.</p>
|
|||
|
</div><h4 id='method.iter' class="method"><div class="important-traits"><div class='tooltip'>ⓘ<span class='tooltiptext'>Important traits for <a class="struct" href="../../syn/punctuated/struct.Iter.html" title="struct syn::punctuated::Iter">Iter</a><'a, T></span></div><div class="content hidden"><h3 class="important">Important traits for <a class="struct" href="../../syn/punctuated/struct.Iter.html" title="struct syn::punctuated::Iter">Iter</a><'a, T></h3><code class="content"><span class="where fmt-newline">impl<'a, T> <a class="trait" href="https://doc.rust-lang.org/nightly/core/iter/iterator/trait.Iterator.html" title="trait core::iter::iterator::Iterator">Iterator</a> for <a class="struct" href="../../syn/punctuated/struct.Iter.html" title="struct syn::punctuated::Iter">Iter</a><'a, T></span><span class="where fmt-newline"> type <a href='https://doc.rust-lang.org/nightly/core/iter/iterator/trait.Iterator.html#associatedtype.Item' class="type">Item</a> = <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&'a </a>T;</span></code></div></div><span id='iter.v' class='invisible'><code>pub fn <a href='#method.iter' class='fnname'>iter</a>(&self) -> <a class="struct" href="../../syn/punctuated/struct.Iter.html" title="struct syn::punctuated::Iter">Iter</a><T></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/syn/punctuated.rs.html#111-118' title='goto source code'>[src]</a></span></h4>
|
|||
|
<div class='docblock'><p>Returns an iterator over borrowed syntax tree nodes of type <code>&T</code>.</p>
|
|||
|
</div><h4 id='method.iter_mut' class="method"><div class="important-traits"><div class='tooltip'>ⓘ<span class='tooltiptext'>Important traits for <a class="struct" href="../../syn/punctuated/struct.IterMut.html" title="struct syn::punctuated::IterMut">IterMut</a><'a, T></span></div><div class="content hidden"><h3 class="important">Important traits for <a class="struct" href="../../syn/punctuated/struct.IterMut.html" title="struct syn::punctuated::IterMut">IterMut</a><'a, T></h3><code class="content"><span class="where fmt-newline">impl<'a, T> <a class="trait" href="https://doc.rust-lang.org/nightly/core/iter/iterator/trait.Iterator.html" title="trait core::iter::iterator::Iterator">Iterator</a> for <a class="struct" href="../../syn/punctuated/struct.IterMut.html" title="struct syn::punctuated::IterMut">IterMut</a><'a, T></span><span class="where fmt-newline"> type <a href='https://doc.rust-lang.org/nightly/core/iter/iterator/trait.Iterator.html#associatedtype.Item' class="type">Item</a> = <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&'a mut </a>T;</span></code></div></div><span id='iter_mut.v' class='invisible'><code>pub fn <a href='#method.iter_mut' class='fnname'>iter_mut</a>(&mut self) -> <a class="struct" href="../../syn/punctuated/struct.IterMut.html" title="struct syn::punctuated::IterMut">IterMut</a><T></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/syn/punctuated.rs.html#122-129' title='goto source code'>[src]</a></span></h4>
|
|||
|
<div class='docblock'><p>Returns an iterator over mutably borrowed syntax tree nodes of type
|
|||
|
<code>&mut T</code>.</p>
|
|||
|
</div><h4 id='method.pairs' class="method"><div class="important-traits"><div class='tooltip'>ⓘ<span class='tooltiptext'>Important traits for <a class="struct" href="../../syn/punctuated/struct.Pairs.html" title="struct syn::punctuated::Pairs">Pairs</a><'a, T, P></span></div><div class="content hidden"><h3 class="important">Important traits for <a class="struct" href="../../syn/punctuated/struct.Pairs.html" title="struct syn::punctuated::Pairs">Pairs</a><'a, T, P></h3><code class="content"><span class="where fmt-newline">impl<'a, T, P> <a class="trait" href="https://doc.rust-lang.org/nightly/core/iter/iterator/trait.Iterator.html" title="trait core::iter::iterator::Iterator">Iterator</a> for <a class="struct" href="../../syn/punctuated/struct.Pairs.html" title="struct syn::punctuated::Pairs">Pairs</a><'a, T, P></span><span class="where fmt-newline"> type <a href='https://doc.rust-lang.org/nightly/core/iter/iterator/trait.Iterator.html#associatedtype.Item' class="type">Item</a> = <a class="enum" href="../../syn/punctuated/enum.Pair.html" title="enum syn::punctuated::Pair">Pair</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&'a </a>T, <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&'a </a>P>;</span></code></div></div><span id='pairs.v' class='invisible'><code>pub fn <a href='#method.pairs' class='fnname'>pairs</a>(&self) -> <a class="struct" href="../../syn/punctuated/struct.Pairs.html" title="struct syn::punctuated::Pairs">Pairs</a><T, P></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/syn/punctuated.rs.html#133-138' title='goto source code'>[src]</a></span></h4>
|
|||
|
<div class='docblock'><p>Returns an iterator over the contents of this sequence as borrowed
|
|||
|
punctuated pairs.</p>
|
|||
|
</div><h4 id='method.pairs_mut' class="method"><div class="important-traits"><div class='tooltip'>ⓘ<span class='tooltiptext'>Important traits for <a class="struct" href="../../syn/punctuated/struct.PairsMut.html" title="struct syn::punctuated::PairsMut">PairsMut</a><'a, T, P></span></div><div class="content hidden"><h3 class="important">Important traits for <a class="struct" href="../../syn/punctuated/struct.PairsMut.html" title="struct syn::punctuated::PairsMut">PairsMut</a><'a, T, P></h3><code class="content"><span class="where fmt-newline">impl<'a, T, P> <a class="trait" href="https://doc.rust-lang.org/nightly/core/iter/iterator/trait.Iterator.html" title="trait core::iter::iterator::Iterator">Iterator</a> for <a class="struct" href="../../syn/punctuated/struct.PairsMut.html" title="struct syn::punctuated::PairsMut">PairsMut</a><'a, T, P></span><span class="where fmt-newline"> type <a href='https://doc.rust-lang.org/nightly/core/iter/iterator/trait.Iterator.html#associatedtype.Item' class="type">Item</a> = <a class="enum" href="../../syn/punctuated/enum.Pair.html" title="enum syn::punctuated::Pair">Pair</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&'a mut </a>T, <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&'a mut </a>P>;</span></code></div></div><span id='pairs_mut.v' class='invisible'><code>pub fn <a href='#method.pairs_mut' class='fnname'>pairs_mut</a>(&mut self) -> <a class="struct" href="../../syn/punctuated/struct.PairsMut.html" title="struct syn::punctuated::PairsMut">PairsMut</a><T, P></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/syn/punctuated.rs.html#142-147' title='goto source code'>[src]</a></span></h4>
|
|||
|
<div class='docblock'><p>Returns an iterator over the contents of this sequence as mutably
|
|||
|
borrowed punctuated pairs.</p>
|
|||
|
</div><h4 id='method.into_pairs' class="method"><div class="important-traits"><div class='tooltip'>ⓘ<span class='tooltiptext'>Important traits for <a class="struct" href="../../syn/punctuated/struct.IntoPairs.html" title="struct syn::punctuated::IntoPairs">IntoPairs</a><T, P></span></div><div class="content hidden"><h3 class="important">Important traits for <a class="struct" href="../../syn/punctuated/struct.IntoPairs.html" title="struct syn::punctuated::IntoPairs">IntoPairs</a><T, P></h3><code class="content"><span class="where fmt-newline">impl<T, P> <a class="trait" href="https://doc.rust-lang.org/nightly/core/iter/iterator/trait.Iterator.html" title="trait core::iter::iterator::Iterator">Iterator</a> for <a class="struct" href="../../syn/punctuated/struct.IntoPairs.html" title="struct syn::punctuated::IntoPairs">IntoPairs</a><T, P></span><span class="where fmt-newline"> type <a href='https://doc.rust-lang.org/nightly/core/iter/iterator/trait.Iterator.html#associatedtype.Item' class="type">Item</a> = <a class="enum" href="../../syn/punctuated/enum.Pair.html" title="enum syn::punctuated::Pair">Pair</a><T, P>;</span></code></div></div><span id='into_pairs.v' class='invisible'><code>pub fn <a href='#method.into_pairs' class='fnname'>into_pairs</a>(self) -> <a class="struct" href="../../syn/punctuated/struct.IntoPairs.html" title="struct syn::punctuated::IntoPairs">IntoPairs</a><T, P></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/syn/punctuated.rs.html#151-156' title='goto source code'>[src]</a></span></h4>
|
|||
|
<div class='docblock'><p>Returns an iterator over the contents of this sequence as owned
|
|||
|
punctuated pairs.</p>
|
|||
|
</div><h4 id='method.push_value' class="method"><span id='push_value.v' class='invisible'><code>pub fn <a href='#method.push_value' class='fnname'>push_value</a>(&mut self, value: T)</code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/syn/punctuated.rs.html#170-173' title='goto source code'>[src]</a></span></h4>
|
|||
|
<div class='docblock'><p>Appends a syntax tree node onto the end of this punctuated sequence. The
|
|||
|
sequence must previously have a trailing punctuation.</p>
|
|||
|
<p>Use <a href="#method.push"><code>push</code></a> instead if the punctuated sequence may or may not already
|
|||
|
have trailing punctuation.</p>
|
|||
|
<h1 id="panics" class="section-header"><a href="#panics">Panics</a></h1>
|
|||
|
<p>Panics if the sequence does not already have a trailing punctuation when
|
|||
|
this method is called.</p>
|
|||
|
</div><h4 id='method.push_punct' class="method"><span id='push_punct.v' class='invisible'><code>pub fn <a href='#method.push_punct' class='fnname'>push_punct</a>(&mut self, punctuation: P)</code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/syn/punctuated.rs.html#182-186' title='goto source code'>[src]</a></span></h4>
|
|||
|
<div class='docblock'><p>Appends a trailing punctuation onto the end of this punctuated sequence.
|
|||
|
The sequence must be non-empty and must not already have trailing
|
|||
|
punctuation.</p>
|
|||
|
<h1 id="panics-1" class="section-header"><a href="#panics-1">Panics</a></h1>
|
|||
|
<p>Panics if the sequence is empty or already has a trailing punctuation.</p>
|
|||
|
</div><h4 id='method.pop' class="method"><span id='pop.v' class='invisible'><code>pub fn <a href='#method.pop' class='fnname'>pop</a>(&mut 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="enum" href="../../syn/punctuated/enum.Pair.html" title="enum syn::punctuated::Pair">Pair</a><T, P>></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/syn/punctuated.rs.html#190-196' title='goto source code'>[src]</a></span></h4>
|
|||
|
<div class='docblock'><p>Removes the last punctuated pair from this sequence, or <code>None</code> if the
|
|||
|
sequence is empty.</p>
|
|||
|
</div><h4 id='method.trailing_punct' class="method"><span id='trailing_punct.v' class='invisible'><code>pub fn <a href='#method.trailing_punct' class='fnname'>trailing_punct</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/syn/punctuated.rs.html#200-202' title='goto source code'>[src]</a></span></h4>
|
|||
|
<div class='docblock'><p>Determines whether this punctuated sequence ends with a trailing
|
|||
|
punctuation.</p>
|
|||
|
</div><h4 id='method.empty_or_trailing' class="method"><span id='empty_or_trailing.v' class='invisible'><code>pub fn <a href='#method.empty_or_trailing' class='fnname'>empty_or_trailing</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/syn/punctuated.rs.html#208-210' title='goto source code'>[src]</a></span></h4>
|
|||
|
<div class='docblock'><p>Returns true if either this <code>Punctuated</code> is empty, or it has a trailing
|
|||
|
punctuation.</p>
|
|||
|
<p>Equivalent to <code>punctuated.is_empty() || punctuated.trailing_punct()</code>.</p>
|
|||
|
</div></div><h3 id='impl-1' class='impl'><span class='in-band'><code>impl<T, P> <a class="struct" href="../../syn/punctuated/struct.Punctuated.html" title="struct syn::punctuated::Punctuated">Punctuated</a><T, P> <span class="where fmt-newline">where<br> P: <a class="trait" href="https://doc.rust-lang.org/nightly/core/default/trait.Default.html" title="trait core::default::Default">Default</a>, </span></code><a href='#impl-1' class='anchor'></a></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/syn/punctuated.rs.html#213-244' title='goto source code'>[src]</a></span></h3>
|
|||
|
<div class='impl-items'><h4 id='method.push' class="method"><span id='push.v' class='invisible'><code>pub fn <a href='#method.push' class='fnname'>push</a>(&mut self, value: T)</code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/syn/punctuated.rs.html#222-227' title='goto source code'>[src]</a></span></h4>
|
|||
|
<div class='docblock'><p>Appends a syntax tree node onto the end of this punctuated sequence.</p>
|
|||
|
<p>If there is not a trailing punctuation in this sequence when this method
|
|||
|
is called, the default value of punctuation type <code>P</code> is inserted before
|
|||
|
the given value of type <code>T</code>.</p>
|
|||
|
</div><h4 id='method.insert' class="method"><span id='insert.v' class='invisible'><code>pub fn <a href='#method.insert' class='fnname'>insert</a>(&mut self, index: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>, value: T)</code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/syn/punctuated.rs.html#235-243' title='goto source code'>[src]</a></span></h4>
|
|||
|
<div class='docblock'><p>Inserts an element at position <code>index</code>.</p>
|
|||
|
<h1 id="panics-2" class="section-header"><a href="#panics-2">Panics</a></h1>
|
|||
|
<p>Panics if <code>index</code> is greater than the number of elements previously in
|
|||
|
this punctuated sequence.</p>
|
|||
|
</div></div><h3 id='impl-2' class='impl'><span class='in-band'><code>impl<T, P> <a class="struct" href="../../syn/punctuated/struct.Punctuated.html" title="struct syn::punctuated::Punctuated">Punctuated</a><T, P> <span class="where fmt-newline">where<br> T: <a class="trait" href="../../syn/synom/trait.Synom.html" title="trait syn::synom::Synom">Synom</a>,<br> P: <a class="trait" href="../../syn/synom/trait.Synom.html" title="trait syn::synom::Synom">Synom</a>, </span></code><a href='#impl-2' class='anchor'></a></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/syn/punctuated.rs.html#657-686' title='goto source code'>[src]</a></span></h3>
|
|||
|
<div class='impl-items'><h4 id='method.parse_separated' class="method"><span id='parse_separated.v' class='invisible'><code>pub fn <a href='#method.parse_separated' class='fnname'>parse_separated</a>(input: <a class="struct" href="../../syn/buffer/struct.Cursor.html" title="struct syn::buffer::Cursor">Cursor</a>) -> <a class="type" href="../../syn/synom/type.PResult.html" title="type syn::synom::PResult">PResult</a><Self></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/syn/punctuated.rs.html#664-666' title='goto source code'>[src]</a></span></h4>
|
|||
|
<div class='docblock'><p>Parse <strong>zero or more</strong> syntax tree nodes with punctuation in between and
|
|||
|
<strong>no trailing</strong> punctuation.</p>
|
|||
|
</div><h4 id='method.parse_separated_nonempty' class="method"><span id='parse_separated_nonempty.v' class='invisible'><code>pub fn <a href='#method.parse_separated_nonempty' class='fnname'>parse_separated_nonempty</a>(input: <a class="struct" href="../../syn/buffer/struct.Cursor.html" title="struct syn::buffer::Cursor">Cursor</a>) -> <a class="type" href="../../syn/synom/type.PResult.html" title="type syn::synom::PResult">PResult</a><Self></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/syn/punctuated.rs.html#671-673' title='goto source code'>[src]</a></span></h4>
|
|||
|
<div class='docblock'><p>Parse <strong>one or more</strong> syntax tree nodes with punctuation in bewteen and
|
|||
|
<strong>no trailing</strong> punctuation.
|
|||
|
allowing trailing punctuation.</p>
|
|||
|
</div><h4 id='method.parse_terminated' class="method"><span id='parse_terminated.v' class='invisible'><code>pub fn <a href='#method.parse_terminated' class='fnname'>parse_terminated</a>(input: <a class="struct" href="../../syn/buffer/struct.Cursor.html" title="struct syn::buffer::Cursor">Cursor</a>) -> <a class="type" href="../../syn/synom/type.PResult.html" title="type syn::synom::PResult">PResult</a><Self></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/syn/punctuated.rs.html#677-679' title='goto source code'>[src]</a></span></h4>
|
|||
|
<div class='docblock'><p>Parse <strong>zero or more</strong> syntax tree nodes with punctuation in between and
|
|||
|
<strong>optional trailing</strong> punctuation.</p>
|
|||
|
</div><h4 id='method.parse_terminated_nonempty' class="method"><span id='parse_terminated_nonempty.v' class='invisible'><code>pub fn <a href='#method.parse_terminated_nonempty' class='fnname'>parse_terminated_nonempty</a>(input: <a class="struct" href="../../syn/buffer/struct.Cursor.html" title="struct syn::buffer::Cursor">Cursor</a>) -> <a class="type" href="../../syn/synom/type.PResult.html" title="type syn::synom::PResult">PResult</a><Self></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/syn/punctuated.rs.html#683-685' title='goto source code'>[src]</a></span></h4>
|
|||
|
<div class='docblock'><p>Parse <strong>one or more</strong> syntax tree nodes with punctuation in between and
|
|||
|
<strong>optional trailing</strong> punctuation.</p>
|
|||
|
</div></div><h3 id='impl-3' class='impl'><span class='in-band'><code>impl<T, P> <a class="struct" href="../../syn/punctuated/struct.Punctuated.html" title="struct syn::punctuated::Punctuated">Punctuated</a><T, P> <span class="where fmt-newline">where<br> P: <a class="trait" href="../../syn/synom/trait.Synom.html" title="trait syn::synom::Synom">Synom</a>, </span></code><a href='#impl-3' class='anchor'></a></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/syn/punctuated.rs.html#689-774' title='goto source code'>[src]</a></span></h3>
|
|||
|
<div class='impl-items'><h4 id='method.parse_separated_with' class="method"><span id='parse_separated_with.v' class='invisible'><code>pub fn <a href='#method.parse_separated_with' class='fnname'>parse_separated_with</a>(<br> input: <a class="struct" href="../../syn/buffer/struct.Cursor.html" title="struct syn::buffer::Cursor">Cursor</a>, <br> parse: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.fn.html">fn</a>(_: <a class="struct" href="../../syn/buffer/struct.Cursor.html" title="struct syn::buffer::Cursor">Cursor</a>) -> <a class="type" href="../../syn/synom/type.PResult.html" title="type syn::synom::PResult">PResult</a><T><br>) -> <a class="type" href="../../syn/synom/type.PResult.html" title="type syn::synom::PResult">PResult</a><Self></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/syn/punctuated.rs.html#695-697' title='goto source code'>[src]</a></span></h4>
|
|||
|
<div class='docblock'><p>Parse <strong>zero or more</strong> syntax tree nodes using the given parser with
|
|||
|
punctuation in between and <strong>no trailing</strong> punctuation.</p>
|
|||
|
</div><h4 id='method.parse_separated_nonempty_with' class="method"><span id='parse_separated_nonempty_with.v' class='invisible'><code>pub fn <a href='#method.parse_separated_nonempty_with' class='fnname'>parse_separated_nonempty_with</a>(<br> input: <a class="struct" href="../../syn/buffer/struct.Cursor.html" title="struct syn::buffer::Cursor">Cursor</a>, <br> parse: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.fn.html">fn</a>(_: <a class="struct" href="../../syn/buffer/struct.Cursor.html" title="struct syn::buffer::Cursor">Cursor</a>) -> <a class="type" href="../../syn/synom/type.PResult.html" title="type syn::synom::PResult">PResult</a><T><br>) -> <a class="type" href="../../syn/synom/type.PResult.html" title="type syn::synom::PResult">PResult</a><Self></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/syn/punctuated.rs.html#701-709' title='goto source code'>[src]</a></span></h4>
|
|||
|
<div class='docblock'><p>Parse <strong>one or more</strong> syntax tree nodes using the given parser with
|
|||
|
punctuation in between and <strong>no trailing</strong> punctuation.</p>
|
|||
|
</div><h4 id='method.parse_terminated_with' class="method"><span id='parse_terminated_with.v' class='invisible'><code>pub fn <a href='#method.parse_terminated_with' class='fnname'>parse_terminated_with</a>(<br> input: <a class="struct" href="../../syn/buffer/struct.Cursor.html" title="struct syn::buffer::Cursor">Cursor</a>, <br> parse: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.fn.html">fn</a>(_: <a class="struct" href="../../syn/buffer/struct.Cursor.html" title="struct syn::buffer::Cursor">Cursor</a>) -> <a class="type" href="../../syn/synom/type.PResult.html" title="type syn::synom::PResult">PResult</a><T><br>) -> <a class="type" href="../../syn/synom/type.PResult.html" title="type syn::synom::PResult">PResult</a><Self></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/syn/punctuated.rs.html#713-715' title='goto source code'>[src]</a></span></h4>
|
|||
|
<div class='docblock'><p>Parse <strong>zero or more</strong> syntax tree nodes using the given parser with
|
|||
|
punctuation in between and <strong>optional trailing</strong> punctuation.</p>
|
|||
|
</div><h4 id='method.parse_terminated_nonempty_with' class="method"><span id='parse_terminated_nonempty_with.v' class='invisible'><code>pub fn <a href='#method.parse_terminated_nonempty_with' class='fnname'>parse_terminated_nonempty_with</a>(<br> input: <a class="struct" href="../../syn/buffer/struct.Cursor.html" title="struct syn::buffer::Cursor">Cursor</a>, <br> parse: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.fn.html">fn</a>(_: <a class="struct" href="../../syn/buffer/struct.Cursor.html" title="struct syn::buffer::Cursor">Cursor</a>) -> <a class="type" href="../../syn/synom/type.PResult.html" title="type syn::synom::PResult">PResult</a><T><br>) -> <a class="type" href="../../syn/synom/type.PResult.html" title="type syn::synom::PResult">PResult</a><Self></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/syn/punctuated.rs.html#719-727' title='goto source code'>[src]</a></span></h4>
|
|||
|
<div class='docblock'><p>Parse <strong>one or more</strong> syntax tree nodes using the given parser with
|
|||
|
punctuation in between and <strong>optional trailing</strong> punctuation.</p>
|
|||
|
</div></div>
|
|||
|
<h2 id='implementations' class='small-section-header'>
|
|||
|
Trait Implementations<a href='#implementations' class='anchor'></a>
|
|||
|
</h2>
|
|||
|
<h3 id='impl-ToTokens' class='impl'><span class='in-band'><code>impl<T, P> <a class="trait" href="../../quote/to_tokens/trait.ToTokens.html" title="trait quote::to_tokens::ToTokens">ToTokens</a> for <a class="struct" href="../../syn/punctuated/struct.Punctuated.html" title="struct syn::punctuated::Punctuated">Punctuated</a><T, P> <span class="where fmt-newline">where<br> T: <a class="trait" href="../../quote/to_tokens/trait.ToTokens.html" title="trait quote::to_tokens::ToTokens">ToTokens</a>,<br> P: <a class="trait" href="../../quote/to_tokens/trait.ToTokens.html" title="trait quote::to_tokens::ToTokens">ToTokens</a>, </span></code><a href='#impl-ToTokens' class='anchor'></a></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/syn/punctuated.rs.html#782-790' title='goto source code'>[src]</a></span></h3>
|
|||
|
<div class='impl-items'><h4 id='method.to_tokens' class="method"><span id='to_tokens.v' class='invisible'><code>fn <a href='../../quote/to_tokens/trait.ToTokens.html#tymethod.to_tokens' class='fnname'>to_tokens</a>(&self, tokens: &mut <a class="struct" href="../../proc_macro2/struct.TokenStream.html" title="struct proc_macro2::TokenStream">TokenStream</a>)</code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/syn/punctuated.rs.html#787-789' title='goto source code'>[src]</a></span></h4>
|
|||
|
<div class='docblock'><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"><span id='into_token_stream.v' class='invisible'><code>fn <a href='../../quote/to_tokens/trait.ToTokens.html#method.into_token_stream' class='fnname'>into_token_stream</a>(self) -> <a class="struct" href="../../proc_macro2/struct.TokenStream.html" title="struct proc_macro2::TokenStream">TokenStream</a></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/quote/to_tokens.rs.html#65-72' title='goto source code'>[src]</a></span></h4>
|
|||
|
<div class='docblock'><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-Eq' class='impl'><span class='in-band'><code>impl<T: <a class="trait" href="https://doc.rust-lang.org/nightly/core/cmp/trait.Eq.html" title="trait core::cmp::Eq">Eq</a>, P: <a class="trait" href="https://doc.rust-lang.org/nightly/core/cmp/trait.Eq.html" title="trait core::cmp::Eq">Eq</a>> <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/punctuated/struct.Punctuated.html" title="struct syn::punctuated::Punctuated">Punctuated</a><T, P></code><a href='#impl-Eq' class='anchor'></a></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/syn/punctuated.rs.html#53' title='goto source code'>[src]</a></span></h3>
|
|||
|
<div class='impl-items'></div><h3 id='impl-PartialEq' class='impl'><span class='in-band'><code>impl<T: <a class="trait" href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html" title="trait core::cmp::PartialEq">PartialEq</a>, P: <a class="trait" href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html" title="trait core::cmp::PartialEq">PartialEq</a>> <a class="trait" href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html" title="trait core::cmp::PartialEq">PartialEq</a> for <a class="struct" href="../../syn/punctuated/struct.Punctuated.html" title="struct syn::punctuated::Punctuated">Punctuated</a><T, P></code><a href='#impl-PartialEq' class='anchor'></a></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/syn/punctuated.rs.html#53' title='goto source code'>[src]</a></span></h3>
|
|||
|
<div class='impl-items'><h4 id='method.eq' class="method"><span id='eq.v' class='invisible'><code>fn <a href='https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html#tymethod.eq' class='fnname'>eq</a>(&self, __arg_0: &<a class="struct" href="../../syn/punctuated/struct.Punctuated.html" title="struct syn::punctuated::Punctuated">Punctuated</a><T, P>) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/syn/punctuated.rs.html#53' title='goto source code'>[src]</a></span></h4>
|
|||
|
<div class='docblock'><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"><span id='ne.v' class='invisible'><code>fn <a href='https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html#method.ne' class='fnname'>ne</a>(&self, __arg_0: &<a class="struct" href="../../syn/punctuated/struct.Punctuated.html" title="struct syn::punctuated::Punctuated">Punctuated</a><T, P>) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/syn/punctuated.rs.html#53' title='goto source code'>[src]</a></span></h4>
|
|||
|
<div class='docblock'><p>This method tests for <code>!=</code>.</p>
|
|||
|
</div></div><h3 id='impl-Hash' class='impl'><span class='in-band'><code>impl<T: <a class="trait" href="https://doc.rust-lang.org/nightly/core/hash/trait.Hash.html" title="trait core::hash::Hash">Hash</a>, P: <a class="trait" href="https://doc.rust-lang.org/nightly/core/hash/trait.Hash.html" title="trait core::hash::Hash">Hash</a>> <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/punctuated/struct.Punctuated.html" title="struct syn::punctuated::Punctuated">Punctuated</a><T, P></code><a href='#impl-Hash' class='anchor'></a></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/syn/punctuated.rs.html#53' title='goto source code'>[src]</a></span></h3>
|
|||
|
<div class='impl-items'><h4 id='method.hash' class="method"><span id='hash.v' class='invisible'><code>fn <a href='https://doc.rust-lang.org/nightly/core/hash/trait.Hash.html#tymethod.hash' class='fnname'>hash</a><__HTP: <a class="trait" href="https://doc.rust-lang.org/nightly/core/hash/trait.Hasher.html" title="trait core::hash::Hasher">Hasher</a>>(&self, __arg_0: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&mut </a>__HTP)</code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/syn/punctuated.rs.html#53' title='goto source code'>[src]</a></span></h4>
|
|||
|
<div class='docblock'><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"><span id='hash_slice.v' class='invisible'><code>fn <a href='https://doc.rust-lang.org/nightly/core/hash/trait.Hash.html#method.hash_slice' class='fnname'>hash_slice</a><H>(data: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">&[Self]</a>, state: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&mut </a>H) <span class="where fmt-newline">where<br> H: <a class="trait" href="https://doc.rust-lang.org/nightly/core/hash/trait.Hasher.html" title="trait core::hash::Hasher">Hasher</a>, </span></code></span><span class='out-of-band'><div class='ghost'></div><div class='since' title='Stable since Rust version 1.3.0'>1.3.0</div><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/hash/mod.rs.html#202-208' title='goto source code'>[src]</a></span></h4>
|
|||
|
<div class='docblock'><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-Clone' class='impl'><span class='in-band'><code>impl<T: <a class="trait" href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a>, P: <a class="trait" href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a>> <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/punctuated/struct.Punctuated.html" title="struct syn::punctuated::Punctuated">Punctuated</a><T, P></code><a href='#impl-Clone' class='anchor'></a></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/syn/punctuated.rs.html#54' title='goto source code'>[src]</a></span></h3>
|
|||
|
<div class='impl-items'><h4 id='method.clone' class="method"><span id='clone.v' class='invisible'><code>fn <a href='https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#tymethod.clone' class='fnname'>clone</a>(&self) -> <a class="struct" href="../../syn/punctuated/struct.Punctuated.html" title="struct syn::punctuated::Punctuated">Punctuated</a><T, P></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/syn/punctuated.rs.html#54' title='goto source code'>[src]</a></span></h4>
|
|||
|
<div class='docblock'><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"><span id='clone_from.v' class='invisible'><code>fn <a href='https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#method.clone_from' class='fnname'>clone_from</a>(&mut self, source: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&</a>Self)</code></span><span class='out-of-band'><div class='ghost'></div><div class='since' title='Stable since Rust version 1.0.0'>1.0.0</div><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/clone.rs.html#112-114' title='goto source code'>[src]</a></span></h4>
|
|||
|
<div class='docblock'><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-Debug' class='impl'><span class='in-band'><code>impl<T: <a class="trait" href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a>, P: <a class="trait" href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a>> <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/punctuated/struct.Punctuated.html" title="struct syn::punctuated::Punctuated">Punctuated</a><T, P></code><a href='#impl-Debug' class='anchor'></a></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/syn/punctuated.rs.html#247-259' title='goto source code'>[src]</a></span></h3>
|
|||
|
<div class='impl-items'><h4 id='method.fmt' class="method"><span id='fmt.v' class='invisible'><code>fn <a href='https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html#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></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/syn/punctuated.rs.html#248-258' title='goto source code'>[src]</a></span></h4>
|
|||
|
<div class='docblock'><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-FromIterator%3CT%3E' class='impl'><span class='in-band'><code>impl<T, P> <a class="trait" href="https://doc.rust-lang.org/nightly/core/iter/traits/trait.FromIterator.html" title="trait core::iter::traits::FromIterator">FromIterator</a><T> for <a class="struct" href="../../syn/punctuated/struct.Punctuated.html" title="struct syn::punctuated::Punctuated">Punctuated</a><T, P> <span class="where fmt-newline">where<br> P: <a class="trait" href="https://doc.rust-lang.org/nightly/core/default/trait.Default.html" title="trait core::default::Default">Default</a>, </span></code><a href='#impl-FromIterator%3CT%3E' class='anchor'></a></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/syn/punctuated.rs.html#261-270' title='goto source code'>[src]</a></span></h3>
|
|||
|
<div class='impl-items'><h4 id='method.from_iter' class="method"><span id='from_iter.v' class='invisible'><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/traits/trait.FromIterator.html#tymethod.from_iter' class='fnname'>from_iter</a><I: <a class="trait" href="https://doc.rust-lang.org/nightly/core/iter/traits/trait.IntoIterator.html" title="trait core::iter::traits::IntoIterator">IntoIterator</a><Item = T>>(i: I) -> Self</code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/syn/punctuated.rs.html#265-269' title='goto source code'>[src]</a></span></h4>
|
|||
|
<div class='docblock'><p>Creates a value from an iterator. <a href="https://doc.rust-lang.org/nightly/core/iter/traits/trait.FromIterator.html#tymethod.from_iter">Read more</a></p>
|
|||
|
</div></div><h3 id='impl-Extend%3CT%3E' class='impl'><span class='in-band'><code>impl<T, P> <a class="trait" href="https://doc.rust-lang.org/nightly/core/iter/traits/trait.Extend.html" title="trait core::iter::traits::Extend">Extend</a><T> for <a class="struct" href="../../syn/punctuated/struct.Punctuated.html" title="struct syn::punctuated::Punctuated">Punctuated</a><T, P> <span class="where fmt-newline">where<br> P: <a class="trait" href="https://doc.rust-lang.org/nightly/core/default/trait.Default.html" title="trait core::default::Default">Default</a>, </span></code><a href='#impl-Extend%3CT%3E' class='anchor'></a></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/syn/punctuated.rs.html#272-281' title='goto source code'>[src]</a></span></h3>
|
|||
|
<div class='impl-items'><h4 id='method.extend' class="method"><span id='extend.v' class='invisible'><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/traits/trait.Extend.html#tymethod.extend' class='fnname'>extend</a><I: <a class="trait" href="https://doc.rust-lang.org/nightly/core/iter/traits/trait.IntoIterator.html" title="trait core::iter::traits::IntoIterator">IntoIterator</a><Item = T>>(&mut self, i: I)</code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/syn/punctuated.rs.html#276-280' title='goto source code'>[src]</a></span></h4>
|
|||
|
<div class='docblock'><p>Extends a collection with the contents of an iterator. <a href="https://doc.rust-lang.org/nightly/core/iter/traits/trait.Extend.html#tymethod.extend">Read more</a></p>
|
|||
|
</div></div><h3 id='impl-FromIterator%3CPair%3CT%2C%20P%3E%3E' class='impl'><span class='in-band'><code>impl<T, P> <a class="trait" href="https://doc.rust-lang.org/nightly/core/iter/traits/trait.FromIterator.html" title="trait core::iter::traits::FromIterator">FromIterator</a><<a class="enum" href="../../syn/punctuated/enum.Pair.html" title="enum syn::punctuated::Pair">Pair</a><T, P>> for <a class="struct" href="../../syn/punctuated/struct.Punctuated.html" title="struct syn::punctuated::Punctuated">Punctuated</a><T, P></code><a href='#impl-FromIterator%3CPair%3CT%2C%20P%3E%3E' class='anchor'></a></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/syn/punctuated.rs.html#283-289' title='goto source code'>[src]</a></span></h3>
|
|||
|
<div class='impl-items'><h4 id='method.from_iter-1' class="method"><span id='from_iter.v-1' class='invisible'><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/traits/trait.FromIterator.html#tymethod.from_iter' class='fnname'>from_iter</a><I: <a class="trait" href="https://doc.rust-lang.org/nightly/core/iter/traits/trait.IntoIterator.html" title="trait core::iter::traits::IntoIterator">IntoIterator</a><Item = <a class="enum" href="../../syn/punctuated/enum.Pair.html" title="enum syn::punctuated::Pair">Pair</a><T, P>>>(i: I) -> Self</code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/syn/punctuated.rs.html#284-288' title='goto source code'>[src]</a></span></h4>
|
|||
|
<div class='docblock'><p>Creates a value from an iterator. <a href="https://doc.rust-lang.org/nightly/core/iter/traits/trait.FromIterator.html#tymethod.from_iter">Read more</a></p>
|
|||
|
</div></div><h3 id='impl-Extend%3CPair%3CT%2C%20P%3E%3E' class='impl'><span class='in-band'><code>impl<T, P> <a class="trait" href="https://doc.rust-lang.org/nightly/core/iter/traits/trait.Extend.html" title="trait core::iter::traits::Extend">Extend</a><<a class="enum" href="../../syn/punctuated/enum.Pair.html" title="enum syn::punctuated::Pair">Pair</a><T, P>> for <a class="struct" href="../../syn/punctuated/struct.Punctuated.html" title="struct syn::punctuated::Punctuated">Punctuated</a><T, P></code><a href='#impl-Extend%3CPair%3CT%2C%20P%3E%3E' class='anchor'></a></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/syn/punctuated.rs.html#291-308' title='goto source code'>[src]</a></span></h3>
|
|||
|
<div class='impl-items'><h4 id='method.extend-1' class="method"><span id='extend.v-1' class='invisible'><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/traits/trait.Extend.html#tymethod.extend' class='fnname'>extend</a><I: <a class="trait" href="https://doc.rust-lang.org/nightly/core/iter/traits/trait.IntoIterator.html" title="trait core::iter::traits::IntoIterator">IntoIterator</a><Item = <a class="enum" href="../../syn/punctuated/enum.Pair.html" title="enum syn::punctuated::Pair">Pair</a><T, P>>>(&mut self, i: I)</code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/syn/punctuated.rs.html#292-307' title='goto source code'>[src]</a></span></h4>
|
|||
|
<div class='docblock'><p>Extends a collection with the contents of an iterator. <a href="https://doc.rust-lang.org/nightly/core/iter/traits/trait.Extend.html#tymethod.extend">Read more</a></p>
|
|||
|
</div></div><h3 id='impl-IntoIterator' class='impl'><span class='in-band'><code>impl<T, P> <a class="trait" href="https://doc.rust-lang.org/nightly/core/iter/traits/trait.IntoIterator.html" title="trait core::iter::traits::IntoIterator">IntoIterator</a> for <a class="struct" href="../../syn/punctuated/struct.Punctuated.html" title="struct syn::punctuated::Punctuated">Punctuated</a><T, P></code><a href='#impl-IntoIterator' class='anchor'></a></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/syn/punctuated.rs.html#310-320' title='goto source code'>[src]</a></span></h3>
|
|||
|
<div class='impl-items'><h4 id='associatedtype.Item' class="type"><span id='Item.t' class='invisible'><code>type <a href='https://doc.rust-lang.org/nightly/core/iter/traits/trait.IntoIterator.html#associatedtype.Item' class="type">Item</a> = T</code></span></h4>
|
|||
|
<div class='docblock'><p>The type of the elements being iterated over.</p>
|
|||
|
</div><h4 id='associatedtype.IntoIter' class="type"><span id='IntoIter.t' class='invisible'><code>type <a href='https://doc.rust-lang.org/nightly/core/iter/traits/trait.IntoIterator.html#associatedtype.IntoIter' class="type">IntoIter</a> = <a class="struct" href="../../syn/punctuated/struct.IntoIter.html" title="struct syn::punctuated::IntoIter">IntoIter</a><T, P></code></span></h4>
|
|||
|
<div class='docblock'><p>Which kind of iterator are we turning this into?</p>
|
|||
|
</div><h4 id='method.into_iter' class="method"><span id='into_iter.v' class='invisible'><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/traits/trait.IntoIterator.html#tymethod.into_iter' class='fnname'>into_iter</a>(self) -> Self::<a class="type" href="https://doc.rust-lang.org/nightly/core/iter/traits/trait.IntoIterator.html#associatedtype.IntoIter" title="type core::iter::traits::IntoIterator::IntoIter">IntoIter</a></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/syn/punctuated.rs.html#314-319' title='goto source code'>[src]</a></span></h4>
|
|||
|
<div class='docblock'><p>Creates an iterator from a value. <a href="https://doc.rust-lang.org/nightly/core/iter/traits/trait.IntoIterator.html#tymethod.into_iter">Read more</a></p>
|
|||
|
</div></div><h3 id='impl-IntoIterator-1' class='impl'><span class='in-band'><code>impl<'a, T, P> <a class="trait" href="https://doc.rust-lang.org/nightly/core/iter/traits/trait.IntoIterator.html" title="trait core::iter::traits::IntoIterator">IntoIterator</a> for &'a <a class="struct" href="../../syn/punctuated/struct.Punctuated.html" title="struct syn::punctuated::Punctuated">Punctuated</a><T, P></code><a href='#impl-IntoIterator-1' class='anchor'></a></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/syn/punctuated.rs.html#322-329' title='goto source code'>[src]</a></span></h3>
|
|||
|
<div class='impl-items'><h4 id='associatedtype.Item-1' class="type"><span id='Item.t-1' class='invisible'><code>type <a href='https://doc.rust-lang.org/nightly/core/iter/traits/trait.IntoIterator.html#associatedtype.Item' class="type">Item</a> = <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&'a </a>T</code></span></h4>
|
|||
|
<div class='docblock'><p>The type of the elements being iterated over.</p>
|
|||
|
</div><h4 id='associatedtype.IntoIter-1' class="type"><span id='IntoIter.t-1' class='invisible'><code>type <a href='https://doc.rust-lang.org/nightly/core/iter/traits/trait.IntoIterator.html#associatedtype.IntoIter' class="type">IntoIter</a> = <a class="struct" href="../../syn/punctuated/struct.Iter.html" title="struct syn::punctuated::Iter">Iter</a><'a, T></code></span></h4>
|
|||
|
<div class='docblock'><p>Which kind of iterator are we turning this into?</p>
|
|||
|
</div><h4 id='method.into_iter-1' class="method"><span id='into_iter.v-1' class='invisible'><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/traits/trait.IntoIterator.html#tymethod.into_iter' class='fnname'>into_iter</a>(self) -> Self::<a class="type" href="https://doc.rust-lang.org/nightly/core/iter/traits/trait.IntoIterator.html#associatedtype.IntoIter" title="type core::iter::traits::IntoIterator::IntoIter">IntoIter</a></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/syn/punctuated.rs.html#326-328' title='goto source code'>[src]</a></span></h4>
|
|||
|
<div class='docblock'><p>Creates an iterator from a value. <a href="https://doc.rust-lang.org/nightly/core/iter/traits/trait.IntoIterator.html#tymethod.into_iter">Read more</a></p>
|
|||
|
</div></div><h3 id='impl-IntoIterator-2' class='impl'><span class='in-band'><code>impl<'a, T, P> <a class="trait" href="https://doc.rust-lang.org/nightly/core/iter/traits/trait.IntoIterator.html" title="trait core::iter::traits::IntoIterator">IntoIterator</a> for &'a mut <a class="struct" href="../../syn/punctuated/struct.Punctuated.html" title="struct syn::punctuated::Punctuated">Punctuated</a><T, P></code><a href='#impl-IntoIterator-2' class='anchor'></a></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/syn/punctuated.rs.html#331-338' title='goto source code'>[src]</a></span></h3>
|
|||
|
<div class='impl-items'><h4 id='associatedtype.Item-2' class="type"><span id='Item.t-2' class='invisible'><code>type <a href='https://doc.rust-lang.org/nightly/core/iter/traits/trait.IntoIterator.html#associatedtype.Item' class="type">Item</a> = <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&'a mut </a>T</code></span></h4>
|
|||
|
<div class='docblock'><p>The type of the elements being iterated over.</p>
|
|||
|
</div><h4 id='associatedtype.IntoIter-2' class="type"><span id='IntoIter.t-2' class='invisible'><code>type <a href='https://doc.rust-lang.org/nightly/core/iter/traits/trait.IntoIterator.html#associatedtype.IntoIter' class="type">IntoIter</a> = <a class="struct" href="../../syn/punctuated/struct.IterMut.html" title="struct syn::punctuated::IterMut">IterMut</a><'a, T></code></span></h4>
|
|||
|
<div class='docblock'><p>Which kind of iterator are we turning this into?</p>
|
|||
|
</div><h4 id='method.into_iter-2' class="method"><span id='into_iter.v-2' class='invisible'><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/traits/trait.IntoIterator.html#tymethod.into_iter' class='fnname'>into_iter</a>(self) -> Self::<a class="type" href="https://doc.rust-lang.org/nightly/core/iter/traits/trait.IntoIterator.html#associatedtype.IntoIter" title="type core::iter::traits::IntoIterator::IntoIter">IntoIter</a></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/syn/punctuated.rs.html#335-337' title='goto source code'>[src]</a></span></h4>
|
|||
|
<div class='docblock'><p>Creates an iterator from a value. <a href="https://doc.rust-lang.org/nightly/core/iter/traits/trait.IntoIterator.html#tymethod.into_iter">Read more</a></p>
|
|||
|
</div></div><h3 id='impl-Default' class='impl'><span class='in-band'><code>impl<T, P> <a class="trait" href="https://doc.rust-lang.org/nightly/core/default/trait.Default.html" title="trait core::default::Default">Default</a> for <a class="struct" href="../../syn/punctuated/struct.Punctuated.html" title="struct syn::punctuated::Punctuated">Punctuated</a><T, P></code><a href='#impl-Default' class='anchor'></a></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/syn/punctuated.rs.html#340-344' title='goto source code'>[src]</a></span></h3>
|
|||
|
<div class='impl-items'><h4 id='method.default' class="method"><span id='default.v' class='invisible'><code>fn <a href='https://doc.rust-lang.org/nightly/core/default/trait.Default.html#tymethod.default' class='fnname'>default</a>() -> Self</code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/syn/punctuated.rs.html#341-343' title='goto source code'>[src]</a></span></h4>
|
|||
|
<div class='docblock'><p>Returns the "default value" for a type. <a href="https://doc.rust-lang.org/nightly/core/default/trait.Default.html#tymethod.default">Read more</a></p>
|
|||
|
</div></div><h3 id='impl-Index%3Cusize%3E' class='impl'><span class='in-band'><code>impl<T, P> <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/index/trait.Index.html" title="trait core::ops::index::Index">Index</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>> for <a class="struct" href="../../syn/punctuated/struct.Punctuated.html" title="struct syn::punctuated::Punctuated">Punctuated</a><T, P></code><a href='#impl-Index%3Cusize%3E' class='anchor'></a></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/syn/punctuated.rs.html#628-641' title='goto source code'>[src]</a></span></h3>
|
|||
|
<div class='impl-items'><h4 id='associatedtype.Output' class="type"><span id='Output.t' class='invisible'><code>type <a href='https://doc.rust-lang.org/nightly/core/ops/index/trait.Index.html#associatedtype.Output' class="type">Output</a> = T</code></span></h4>
|
|||
|
<div class='docblock'><p>The returned type after indexing.</p>
|
|||
|
</div><h4 id='method.index' class="method"><span id='index.v' class='invisible'><code>fn <a href='https://doc.rust-lang.org/nightly/core/ops/index/trait.Index.html#tymethod.index' class='fnname'>index</a>(&self, index: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>) -> &Self::<a class="type" href="https://doc.rust-lang.org/nightly/core/ops/index/trait.Index.html#associatedtype.Output" title="type core::ops::index::Index::Output">Output</a></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/syn/punctuated.rs.html#631-640' title='goto source code'>[src]</a></span></h4>
|
|||
|
<div class='docblock'><p>Performs the indexing (<code>container[index]</code>) operation.</p>
|
|||
|
</div></div><h3 id='impl-IndexMut%3Cusize%3E' class='impl'><span class='in-band'><code>impl<T, P> <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/index/trait.IndexMut.html" title="trait core::ops::index::IndexMut">IndexMut</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>> for <a class="struct" href="../../syn/punctuated/struct.Punctuated.html" title="struct syn::punctuated::Punctuated">Punctuated</a><T, P></code><a href='#impl-IndexMut%3Cusize%3E' class='anchor'></a></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/syn/punctuated.rs.html#643-654' title='goto source code'>[src]</a></span></h3>
|
|||
|
<div class='impl-items'><h4 id='method.index_mut' class="method"><span id='index_mut.v' class='invisible'><code>fn <a href='https://doc.rust-lang.org/nightly/core/ops/index/trait.IndexMut.html#tymethod.index_mut' class='fnname'>index_mut</a>(&mut self, index: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>) -> &mut Self::<a class="type" href="https://doc.rust-lang.org/nightly/core/ops/index/trait.Index.html#associatedtype.Output" title="type core::ops::index::Index::Output">Output</a></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/syn/punctuated.rs.html#644-653' title='goto source code'>[src]</a></span></h4>
|
|||
|
<div class='docblock'><p>Performs the mutable indexing (<code>container[index]</code>) operation.</p>
|
|||
|
</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>⏎</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>
|
|||
|
</div>
|
|||
|
</div>
|
|||
|
</aside>
|
|||
|
|
|||
|
|
|||
|
|
|||
|
<script>
|
|||
|
window.rootPath = "../../";
|
|||
|
window.currentCrate = "syn";
|
|||
|
</script>
|
|||
|
<script src="../../main.js"></script>
|
|||
|
<script defer src="../../search-index.js"></script>
|
|||
|
</body>
|
|||
|
</html>
|