edlang/itertools/trait.PeekingNext.html
2024-07-26 09:42:18 +00:00

37 lines
35 KiB
HTML
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<!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="An iterator that allows peeking at an element before deciding to accept it."><title>PeekingNext in itertools - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-46f98efaafac5295.ttf.woff2,FiraSans-Regular-018c141bf0843ffd.woff2,FiraSans-Medium-8f9a781e4970d388.woff2,SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2,SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2" crossorigin href="../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../static.files/normalize-76eba96aa4d2e634.css"><link rel="stylesheet" href="../static.files/rustdoc-dd39b87e5fcfba68.css"><meta name="rustdoc-vars" data-root-path="../" data-static-root-path="../static.files/" data-current-crate="itertools" data-themes="" data-resource-suffix="" data-rustdoc-version="1.80.0 (051478957 2024-07-21)" data-channel="1.80.0" data-search-js="search-d52510db62a78183.js" data-settings-js="settings-4313503d2e1961c2.js" ><script src="../static.files/storage-118b08c4c78b968e.js"></script><script defer src="sidebar-items.js"></script><script defer src="../static.files/main-20a3ad099b048cf2.js"></script><noscript><link rel="stylesheet" href="../static.files/noscript-df360f571f6edeae.css"></noscript><link rel="alternate icon" type="image/png" href="../static.files/favicon-32x32-422f7d1d52889060.png"><link rel="icon" type="image/svg+xml" href="../static.files/favicon-2c020d218678b618.svg"></head><body class="rustdoc trait"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle" title="show sidebar"></button></nav><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../itertools/index.html">itertools</a><span class="version">0.13.0</span></h2></div><h2 class="location"><a href="#">PeekingNext</a></h2><div class="sidebar-elems"><section><h3><a href="#required-methods">Required Methods</a></h3><ul class="block"><li><a href="#tymethod.peeking_next">peeking_next</a></li></ul><h3><a href="#foreign-impls">Implementations on Foreign Types</a></h3><ul class="block"><li><a href="#impl-PeekingNext-for-%26mut+I">&amp;&#x27;a mut I</a></li><li><a href="#impl-PeekingNext-for-Bytes%3C'a%3E">Bytes&lt;&#x27;a&gt;</a></li><li><a href="#impl-PeekingNext-for-CharIndices%3C'a%3E">CharIndices&lt;&#x27;a&gt;</a></li><li><a href="#impl-PeekingNext-for-Chars%3C'a%3E">Chars&lt;&#x27;a&gt;</a></li><li><a href="#impl-PeekingNext-for-Empty%3CT%3E">Empty&lt;T&gt;</a></li><li><a href="#impl-PeekingNext-for-Iter%3C'a,+T%3E">Iter&lt;&#x27;a, T&gt;</a></li><li><a href="#impl-PeekingNext-for-Iter%3C'a,+T%3E">Iter&lt;&#x27;a, T&gt;</a></li><li><a href="#impl-PeekingNext-for-Iter%3C'a,+T%3E">Iter&lt;&#x27;a, T&gt;</a></li><li><a href="#impl-PeekingNext-for-Iter%3C'a,+T%3E">Iter&lt;&#x27;a, T&gt;</a></li><li><a href="#impl-PeekingNext-for-Iter%3C'a,+T%3E">Iter&lt;&#x27;a, T&gt;</a></li><li><a href="#impl-PeekingNext-for-Peekable%3CI%3E">Peekable&lt;I&gt;</a></li><li><a href="#impl-PeekingNext-for-Rev%3CI%3E">Rev&lt;I&gt;</a></li></ul><h3><a href="#implementors">Implementors</a></h3></section><h2><a href="index.html">In crate itertools</a></h2></div></nav><div class="sidebar-resizer"></div><main><div class="width-limiter"><rustdoc-search></rustdoc-search><section id="main-content" class="content"><div class="main-heading"><h1>Trait <a href="index.html">itertools</a>::<wbr><a class="trait" href="#">PeekingNext</a><button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><span class="out-of-band"><a class="src" href="../src/itertools/peeking_take_while.rs.html#15-23">source</a> · <button id="toggle-all-docs" title="collapse all docs">[<span>&#x2212;</span>]</button></span></div><pre class="rust item-decl"><code>pub trait PeekingNext: <a class="trait" href="https://doc.rust-lang.org/1.80.0/core/iter/traits/iterator/trait.Iterator.html" title="trait core::iter::traits::iterator::Iterator">Iterator</a> {
// Required method
fn <a href="#tymethod.peeking_next" class="fn">peeking_next</a>&lt;F&gt;(&amp;mut self, accept: F) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.80.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;Self::<a class="associatedtype" href="https://doc.rust-lang.org/1.80.0/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" title="type core::iter::traits::iterator::Iterator::Item">Item</a>&gt;
<span class="where">where Self: <a class="trait" href="https://doc.rust-lang.org/1.80.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,
F: <a class="trait" href="https://doc.rust-lang.org/1.80.0/core/ops/function/trait.FnOnce.html" title="trait core::ops::function::FnOnce">FnOnce</a>(&amp;Self::<a class="associatedtype" href="https://doc.rust-lang.org/1.80.0/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" title="type core::iter::traits::iterator::Iterator::Item">Item</a>) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.80.0/std/primitive.bool.html">bool</a></span>;
}</code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>An iterator that allows peeking at an element before deciding to accept it.</p>
<p>See <a href="trait.Itertools.html#method.peeking_take_while" title="method itertools::Itertools::peeking_take_while"><code>.peeking_take_while()</code></a>
for more information.</p>
<p>This is implemented by peeking adaptors like peekable and put back,
but also by a few iterators that can be peeked natively, like the slices
by reference iterator (<a href="https://doc.rust-lang.org/1.80.0/core/slice/iter/struct.Iter.html" title="struct core::slice::iter::Iter"><code>std::slice::Iter</code></a>).</p>
</div></details><h2 id="required-methods" class="section-header">Required Methods<a href="#required-methods" class="anchor">§</a></h2><div class="methods"><details class="toggle method-toggle" open><summary><section id="tymethod.peeking_next" class="method"><a class="src rightside" href="../src/itertools/peeking_take_while.rs.html#19-22">source</a><h4 class="code-header">fn <a href="#tymethod.peeking_next" class="fn">peeking_next</a>&lt;F&gt;(&amp;mut self, accept: F) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.80.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;Self::<a class="associatedtype" href="https://doc.rust-lang.org/1.80.0/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" title="type core::iter::traits::iterator::Iterator::Item">Item</a>&gt;<div class="where">where
Self: <a class="trait" href="https://doc.rust-lang.org/1.80.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,
F: <a class="trait" href="https://doc.rust-lang.org/1.80.0/core/ops/function/trait.FnOnce.html" title="trait core::ops::function::FnOnce">FnOnce</a>(&amp;Self::<a class="associatedtype" href="https://doc.rust-lang.org/1.80.0/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" title="type core::iter::traits::iterator::Iterator::Item">Item</a>) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.80.0/std/primitive.bool.html">bool</a>,</div></h4></section></summary><div class="docblock"><p>Pass a reference to the next iterator element to the closure <code>accept</code>;
if <code>accept</code> returns <code>true</code>, return it as the next element,
else <code>None</code>.</p>
</div></details></div><h2 id="foreign-impls" class="section-header">Implementations on Foreign Types<a href="#foreign-impls" class="anchor">§</a></h2><details class="toggle implementors-toggle"><summary><section id="impl-PeekingNext-for-Bytes%3C'a%3E" class="impl"><a class="src rightside" href="../src/itertools/peeking_take_while.rs.html#190">source</a><a href="#impl-PeekingNext-for-Bytes%3C'a%3E" class="anchor">§</a><h3 class="code-header">impl&lt;'a&gt; <a class="trait" href="trait.PeekingNext.html" title="trait itertools::PeekingNext">PeekingNext</a> for <a class="struct" href="https://doc.rust-lang.org/1.80.0/core/str/iter/struct.Bytes.html" title="struct core::str::iter::Bytes">Bytes</a>&lt;'a&gt;</h3></section></summary><div class="impl-items"><section id="method.peeking_next" class="method trait-impl"><a class="src rightside" href="../src/itertools/peeking_take_while.rs.html#190">source</a><a href="#method.peeking_next" class="anchor">§</a><h4 class="code-header">fn <a href="#tymethod.peeking_next" class="fn">peeking_next</a>&lt;F&gt;(&amp;mut self, accept: F) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.80.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;Self::<a class="associatedtype" href="https://doc.rust-lang.org/1.80.0/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" title="type core::iter::traits::iterator::Iterator::Item">Item</a>&gt;<div class="where">where
F: <a class="trait" href="https://doc.rust-lang.org/1.80.0/core/ops/function/trait.FnOnce.html" title="trait core::ops::function::FnOnce">FnOnce</a>(&amp;Self::<a class="associatedtype" href="https://doc.rust-lang.org/1.80.0/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" title="type core::iter::traits::iterator::Iterator::Item">Item</a>) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.80.0/std/primitive.bool.html">bool</a>,</div></h4></section></div></details><details class="toggle implementors-toggle"><summary><section id="impl-PeekingNext-for-CharIndices%3C'a%3E" class="impl"><a class="src rightside" href="../src/itertools/peeking_take_while.rs.html#189">source</a><a href="#impl-PeekingNext-for-CharIndices%3C'a%3E" class="anchor">§</a><h3 class="code-header">impl&lt;'a&gt; <a class="trait" href="trait.PeekingNext.html" title="trait itertools::PeekingNext">PeekingNext</a> for <a class="struct" href="https://doc.rust-lang.org/1.80.0/core/str/iter/struct.CharIndices.html" title="struct core::str::iter::CharIndices">CharIndices</a>&lt;'a&gt;</h3></section></summary><div class="impl-items"><section id="method.peeking_next-1" class="method trait-impl"><a class="src rightside" href="../src/itertools/peeking_take_while.rs.html#189">source</a><a href="#method.peeking_next-1" class="anchor">§</a><h4 class="code-header">fn <a href="#tymethod.peeking_next" class="fn">peeking_next</a>&lt;F&gt;(&amp;mut self, accept: F) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.80.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;Self::<a class="associatedtype" href="https://doc.rust-lang.org/1.80.0/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" title="type core::iter::traits::iterator::Iterator::Item">Item</a>&gt;<div class="where">where
F: <a class="trait" href="https://doc.rust-lang.org/1.80.0/core/ops/function/trait.FnOnce.html" title="trait core::ops::function::FnOnce">FnOnce</a>(&amp;Self::<a class="associatedtype" href="https://doc.rust-lang.org/1.80.0/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" title="type core::iter::traits::iterator::Iterator::Item">Item</a>) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.80.0/std/primitive.bool.html">bool</a>,</div></h4></section></div></details><details class="toggle implementors-toggle"><summary><section id="impl-PeekingNext-for-Chars%3C'a%3E" class="impl"><a class="src rightside" href="../src/itertools/peeking_take_while.rs.html#188">source</a><a href="#impl-PeekingNext-for-Chars%3C'a%3E" class="anchor">§</a><h3 class="code-header">impl&lt;'a&gt; <a class="trait" href="trait.PeekingNext.html" title="trait itertools::PeekingNext">PeekingNext</a> for <a class="struct" href="https://doc.rust-lang.org/1.80.0/core/str/iter/struct.Chars.html" title="struct core::str::iter::Chars">Chars</a>&lt;'a&gt;</h3></section></summary><div class="impl-items"><section id="method.peeking_next-2" class="method trait-impl"><a class="src rightside" href="../src/itertools/peeking_take_while.rs.html#188">source</a><a href="#method.peeking_next-2" class="anchor">§</a><h4 class="code-header">fn <a href="#tymethod.peeking_next" class="fn">peeking_next</a>&lt;F&gt;(&amp;mut self, accept: F) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.80.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;Self::<a class="associatedtype" href="https://doc.rust-lang.org/1.80.0/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" title="type core::iter::traits::iterator::Iterator::Item">Item</a>&gt;<div class="where">where
F: <a class="trait" href="https://doc.rust-lang.org/1.80.0/core/ops/function/trait.FnOnce.html" title="trait core::ops::function::FnOnce">FnOnce</a>(&amp;Self::<a class="associatedtype" href="https://doc.rust-lang.org/1.80.0/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" title="type core::iter::traits::iterator::Iterator::Item">Item</a>) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.80.0/std/primitive.bool.html">bool</a>,</div></h4></section></div></details><details class="toggle implementors-toggle"><summary><section id="impl-PeekingNext-for-%26mut+I" class="impl"><a class="src rightside" href="../src/itertools/peeking_take_while.rs.html#25-35">source</a><a href="#impl-PeekingNext-for-%26mut+I" class="anchor">§</a><h3 class="code-header">impl&lt;'a, I&gt; <a class="trait" href="trait.PeekingNext.html" title="trait itertools::PeekingNext">PeekingNext</a> for <a class="primitive" href="https://doc.rust-lang.org/1.80.0/std/primitive.reference.html">&amp;'a mut I</a><div class="where">where
I: <a class="trait" href="trait.PeekingNext.html" title="trait itertools::PeekingNext">PeekingNext</a>,</div></h3></section></summary><div class="impl-items"><section id="method.peeking_next-3" class="method trait-impl"><a class="src rightside" href="../src/itertools/peeking_take_while.rs.html#29-34">source</a><a href="#method.peeking_next-3" class="anchor">§</a><h4 class="code-header">fn <a href="#tymethod.peeking_next" class="fn">peeking_next</a>&lt;F&gt;(&amp;mut self, accept: F) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.80.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;Self::<a class="associatedtype" href="https://doc.rust-lang.org/1.80.0/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" title="type core::iter::traits::iterator::Iterator::Item">Item</a>&gt;<div class="where">where
F: <a class="trait" href="https://doc.rust-lang.org/1.80.0/core/ops/function/trait.FnOnce.html" title="trait core::ops::function::FnOnce">FnOnce</a>(&amp;Self::<a class="associatedtype" href="https://doc.rust-lang.org/1.80.0/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" title="type core::iter::traits::iterator::Iterator::Item">Item</a>) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.80.0/std/primitive.bool.html">bool</a>,</div></h4></section></div></details><details class="toggle implementors-toggle"><summary><section id="impl-PeekingNext-for-Iter%3C'a,+T%3E" class="impl"><a class="src rightside" href="../src/itertools/peeking_take_while.rs.html#195">source</a><a href="#impl-PeekingNext-for-Iter%3C'a,+T%3E" class="anchor">§</a><h3 class="code-header">impl&lt;'a, T&gt; <a class="trait" href="trait.PeekingNext.html" title="trait itertools::PeekingNext">PeekingNext</a> for <a class="struct" href="https://doc.rust-lang.org/1.80.0/alloc/collections/linked_list/struct.Iter.html" title="struct alloc::collections::linked_list::Iter">Iter</a>&lt;'a, T&gt;</h3></section></summary><div class="impl-items"><section id="method.peeking_next-4" class="method trait-impl"><a class="src rightside" href="../src/itertools/peeking_take_while.rs.html#195">source</a><a href="#method.peeking_next-4" class="anchor">§</a><h4 class="code-header">fn <a href="#tymethod.peeking_next" class="fn">peeking_next</a>&lt;F&gt;(&amp;mut self, accept: F) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.80.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;Self::<a class="associatedtype" href="https://doc.rust-lang.org/1.80.0/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" title="type core::iter::traits::iterator::Iterator::Item">Item</a>&gt;<div class="where">where
F: <a class="trait" href="https://doc.rust-lang.org/1.80.0/core/ops/function/trait.FnOnce.html" title="trait core::ops::function::FnOnce">FnOnce</a>(&amp;Self::<a class="associatedtype" href="https://doc.rust-lang.org/1.80.0/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" title="type core::iter::traits::iterator::Iterator::Item">Item</a>) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.80.0/std/primitive.bool.html">bool</a>,</div></h4></section></div></details><details class="toggle implementors-toggle"><summary><section id="impl-PeekingNext-for-Iter%3C'a,+T%3E-1" class="impl"><a class="src rightside" href="../src/itertools/peeking_take_while.rs.html#197">source</a><a href="#impl-PeekingNext-for-Iter%3C'a,+T%3E-1" class="anchor">§</a><h3 class="code-header">impl&lt;'a, T&gt; <a class="trait" href="trait.PeekingNext.html" title="trait itertools::PeekingNext">PeekingNext</a> for <a class="struct" href="https://doc.rust-lang.org/1.80.0/alloc/collections/vec_deque/iter/struct.Iter.html" title="struct alloc::collections::vec_deque::iter::Iter">Iter</a>&lt;'a, T&gt;</h3></section></summary><div class="impl-items"><section id="method.peeking_next-5" class="method trait-impl"><a class="src rightside" href="../src/itertools/peeking_take_while.rs.html#197">source</a><a href="#method.peeking_next-5" class="anchor">§</a><h4 class="code-header">fn <a href="#tymethod.peeking_next" class="fn">peeking_next</a>&lt;F&gt;(&amp;mut self, accept: F) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.80.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;Self::<a class="associatedtype" href="https://doc.rust-lang.org/1.80.0/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" title="type core::iter::traits::iterator::Iterator::Item">Item</a>&gt;<div class="where">where
F: <a class="trait" href="https://doc.rust-lang.org/1.80.0/core/ops/function/trait.FnOnce.html" title="trait core::ops::function::FnOnce">FnOnce</a>(&amp;Self::<a class="associatedtype" href="https://doc.rust-lang.org/1.80.0/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" title="type core::iter::traits::iterator::Iterator::Item">Item</a>) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.80.0/std/primitive.bool.html">bool</a>,</div></h4></section></div></details><details class="toggle implementors-toggle"><summary><section id="impl-PeekingNext-for-Iter%3C'a,+T%3E-2" class="impl"><a class="src rightside" href="../src/itertools/peeking_take_while.rs.html#191">source</a><a href="#impl-PeekingNext-for-Iter%3C'a,+T%3E-2" class="anchor">§</a><h3 class="code-header">impl&lt;'a, T&gt; <a class="trait" href="trait.PeekingNext.html" title="trait itertools::PeekingNext">PeekingNext</a> for <a class="struct" href="https://doc.rust-lang.org/1.80.0/core/option/struct.Iter.html" title="struct core::option::Iter">Iter</a>&lt;'a, T&gt;</h3></section></summary><div class="impl-items"><section id="method.peeking_next-6" class="method trait-impl"><a class="src rightside" href="../src/itertools/peeking_take_while.rs.html#191">source</a><a href="#method.peeking_next-6" class="anchor">§</a><h4 class="code-header">fn <a href="#tymethod.peeking_next" class="fn">peeking_next</a>&lt;F&gt;(&amp;mut self, accept: F) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.80.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;Self::<a class="associatedtype" href="https://doc.rust-lang.org/1.80.0/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" title="type core::iter::traits::iterator::Iterator::Item">Item</a>&gt;<div class="where">where
F: <a class="trait" href="https://doc.rust-lang.org/1.80.0/core/ops/function/trait.FnOnce.html" title="trait core::ops::function::FnOnce">FnOnce</a>(&amp;Self::<a class="associatedtype" href="https://doc.rust-lang.org/1.80.0/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" title="type core::iter::traits::iterator::Iterator::Item">Item</a>) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.80.0/std/primitive.bool.html">bool</a>,</div></h4></section></div></details><details class="toggle implementors-toggle"><summary><section id="impl-PeekingNext-for-Iter%3C'a,+T%3E-3" class="impl"><a class="src rightside" href="../src/itertools/peeking_take_while.rs.html#192">source</a><a href="#impl-PeekingNext-for-Iter%3C'a,+T%3E-3" class="anchor">§</a><h3 class="code-header">impl&lt;'a, T&gt; <a class="trait" href="trait.PeekingNext.html" title="trait itertools::PeekingNext">PeekingNext</a> for <a class="struct" href="https://doc.rust-lang.org/1.80.0/core/result/struct.Iter.html" title="struct core::result::Iter">Iter</a>&lt;'a, T&gt;</h3></section></summary><div class="impl-items"><section id="method.peeking_next-7" class="method trait-impl"><a class="src rightside" href="../src/itertools/peeking_take_while.rs.html#192">source</a><a href="#method.peeking_next-7" class="anchor">§</a><h4 class="code-header">fn <a href="#tymethod.peeking_next" class="fn">peeking_next</a>&lt;F&gt;(&amp;mut self, accept: F) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.80.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;Self::<a class="associatedtype" href="https://doc.rust-lang.org/1.80.0/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" title="type core::iter::traits::iterator::Iterator::Item">Item</a>&gt;<div class="where">where
F: <a class="trait" href="https://doc.rust-lang.org/1.80.0/core/ops/function/trait.FnOnce.html" title="trait core::ops::function::FnOnce">FnOnce</a>(&amp;Self::<a class="associatedtype" href="https://doc.rust-lang.org/1.80.0/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" title="type core::iter::traits::iterator::Iterator::Item">Item</a>) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.80.0/std/primitive.bool.html">bool</a>,</div></h4></section></div></details><details class="toggle implementors-toggle"><summary><section id="impl-PeekingNext-for-Iter%3C'a,+T%3E-4" class="impl"><a class="src rightside" href="../src/itertools/peeking_take_while.rs.html#187">source</a><a href="#impl-PeekingNext-for-Iter%3C'a,+T%3E-4" class="anchor">§</a><h3 class="code-header">impl&lt;'a, T&gt; <a class="trait" href="trait.PeekingNext.html" title="trait itertools::PeekingNext">PeekingNext</a> for <a class="struct" href="https://doc.rust-lang.org/1.80.0/core/slice/iter/struct.Iter.html" title="struct core::slice::iter::Iter">Iter</a>&lt;'a, T&gt;</h3></section></summary><div class="impl-items"><section id="method.peeking_next-8" class="method trait-impl"><a class="src rightside" href="../src/itertools/peeking_take_while.rs.html#187">source</a><a href="#method.peeking_next-8" class="anchor">§</a><h4 class="code-header">fn <a href="#tymethod.peeking_next" class="fn">peeking_next</a>&lt;F&gt;(&amp;mut self, accept: F) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.80.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;Self::<a class="associatedtype" href="https://doc.rust-lang.org/1.80.0/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" title="type core::iter::traits::iterator::Iterator::Item">Item</a>&gt;<div class="where">where
F: <a class="trait" href="https://doc.rust-lang.org/1.80.0/core/ops/function/trait.FnOnce.html" title="trait core::ops::function::FnOnce">FnOnce</a>(&amp;Self::<a class="associatedtype" href="https://doc.rust-lang.org/1.80.0/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" title="type core::iter::traits::iterator::Iterator::Item">Item</a>) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.80.0/std/primitive.bool.html">bool</a>,</div></h4></section></div></details><details class="toggle implementors-toggle"><summary><section id="impl-PeekingNext-for-Peekable%3CI%3E" class="impl"><a class="src rightside" href="../src/itertools/peeking_take_while.rs.html#37-52">source</a><a href="#impl-PeekingNext-for-Peekable%3CI%3E" class="anchor">§</a><h3 class="code-header">impl&lt;I&gt; <a class="trait" href="trait.PeekingNext.html" title="trait itertools::PeekingNext">PeekingNext</a> for <a class="struct" href="https://doc.rust-lang.org/1.80.0/core/iter/adapters/peekable/struct.Peekable.html" title="struct core::iter::adapters::peekable::Peekable">Peekable</a>&lt;I&gt;<div class="where">where
I: <a class="trait" href="https://doc.rust-lang.org/1.80.0/core/iter/traits/iterator/trait.Iterator.html" title="trait core::iter::traits::iterator::Iterator">Iterator</a>,</div></h3></section></summary><div class="impl-items"><section id="method.peeking_next-9" class="method trait-impl"><a class="src rightside" href="../src/itertools/peeking_take_while.rs.html#41-51">source</a><a href="#method.peeking_next-9" class="anchor">§</a><h4 class="code-header">fn <a href="#tymethod.peeking_next" class="fn">peeking_next</a>&lt;F&gt;(&amp;mut self, accept: F) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.80.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;Self::<a class="associatedtype" href="https://doc.rust-lang.org/1.80.0/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" title="type core::iter::traits::iterator::Iterator::Item">Item</a>&gt;<div class="where">where
F: <a class="trait" href="https://doc.rust-lang.org/1.80.0/core/ops/function/trait.FnOnce.html" title="trait core::ops::function::FnOnce">FnOnce</a>(&amp;Self::<a class="associatedtype" href="https://doc.rust-lang.org/1.80.0/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" title="type core::iter::traits::iterator::Iterator::Item">Item</a>) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.80.0/std/primitive.bool.html">bool</a>,</div></h4></section></div></details><details class="toggle implementors-toggle"><summary><section id="impl-PeekingNext-for-Rev%3CI%3E" class="impl"><a class="src rightside" href="../src/itertools/peeking_take_while.rs.html#200-201">source</a><a href="#impl-PeekingNext-for-Rev%3CI%3E" class="anchor">§</a><h3 class="code-header">impl&lt;I: <a class="trait" href="https://doc.rust-lang.org/1.80.0/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a> + <a class="trait" href="trait.PeekingNext.html" title="trait itertools::PeekingNext">PeekingNext</a> + <a class="trait" href="https://doc.rust-lang.org/1.80.0/core/iter/traits/double_ended/trait.DoubleEndedIterator.html" title="trait core::iter::traits::double_ended::DoubleEndedIterator">DoubleEndedIterator</a>&gt; <a class="trait" href="trait.PeekingNext.html" title="trait itertools::PeekingNext">PeekingNext</a> for <a class="struct" href="https://doc.rust-lang.org/1.80.0/core/iter/adapters/rev/struct.Rev.html" title="struct core::iter::adapters::rev::Rev">Rev</a>&lt;I&gt;</h3></section></summary><div class="impl-items"><section id="method.peeking_next-10" class="method trait-impl"><a class="src rightside" href="../src/itertools/peeking_take_while.rs.html#200-201">source</a><a href="#method.peeking_next-10" class="anchor">§</a><h4 class="code-header">fn <a href="#tymethod.peeking_next" class="fn">peeking_next</a>&lt;F&gt;(&amp;mut self, accept: F) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.80.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;Self::<a class="associatedtype" href="https://doc.rust-lang.org/1.80.0/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" title="type core::iter::traits::iterator::Iterator::Item">Item</a>&gt;<div class="where">where
F: <a class="trait" href="https://doc.rust-lang.org/1.80.0/core/ops/function/trait.FnOnce.html" title="trait core::ops::function::FnOnce">FnOnce</a>(&amp;Self::<a class="associatedtype" href="https://doc.rust-lang.org/1.80.0/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" title="type core::iter::traits::iterator::Iterator::Item">Item</a>) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.80.0/std/primitive.bool.html">bool</a>,</div></h4></section></div></details><details class="toggle implementors-toggle"><summary><section id="impl-PeekingNext-for-Empty%3CT%3E" class="impl"><a class="src rightside" href="../src/itertools/peeking_take_while.rs.html#193">source</a><a href="#impl-PeekingNext-for-Empty%3CT%3E" class="anchor">§</a><h3 class="code-header">impl&lt;T&gt; <a class="trait" href="trait.PeekingNext.html" title="trait itertools::PeekingNext">PeekingNext</a> for <a class="struct" href="https://doc.rust-lang.org/1.80.0/core/iter/sources/empty/struct.Empty.html" title="struct core::iter::sources::empty::Empty">Empty</a>&lt;T&gt;</h3></section></summary><div class="impl-items"><section id="method.peeking_next-11" class="method trait-impl"><a class="src rightside" href="../src/itertools/peeking_take_while.rs.html#193">source</a><a href="#method.peeking_next-11" class="anchor">§</a><h4 class="code-header">fn <a href="#tymethod.peeking_next" class="fn">peeking_next</a>&lt;F&gt;(&amp;mut self, accept: F) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.80.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;Self::<a class="associatedtype" href="https://doc.rust-lang.org/1.80.0/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" title="type core::iter::traits::iterator::Iterator::Item">Item</a>&gt;<div class="where">where
F: <a class="trait" href="https://doc.rust-lang.org/1.80.0/core/ops/function/trait.FnOnce.html" title="trait core::ops::function::FnOnce">FnOnce</a>(&amp;Self::<a class="associatedtype" href="https://doc.rust-lang.org/1.80.0/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" title="type core::iter::traits::iterator::Iterator::Item">Item</a>) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.80.0/std/primitive.bool.html">bool</a>,</div></h4></section></div></details><h2 id="implementors" class="section-header">Implementors<a href="#implementors" class="anchor">§</a></h2><div id="implementors-list"><section id="impl-PeekingNext-for-PeekingTakeWhile%3C'a,+I,+F%3E" class="impl"><a class="src rightside" href="../src/itertools/peeking_take_while.rs.html#151-163">source</a><a href="#impl-PeekingNext-for-PeekingTakeWhile%3C'a,+I,+F%3E" class="anchor">§</a><h3 class="code-header">impl&lt;'a, I, F&gt; <a class="trait" href="trait.PeekingNext.html" title="trait itertools::PeekingNext">PeekingNext</a> for <a class="struct" href="structs/struct.PeekingTakeWhile.html" title="struct itertools::structs::PeekingTakeWhile">PeekingTakeWhile</a>&lt;'a, I, F&gt;<div class="where">where
I: <a class="trait" href="trait.PeekingNext.html" title="trait itertools::PeekingNext">PeekingNext</a>,
F: <a class="trait" href="https://doc.rust-lang.org/1.80.0/core/ops/function/trait.FnMut.html" title="trait core::ops::function::FnMut">FnMut</a>(&amp;I::<a class="associatedtype" href="https://doc.rust-lang.org/1.80.0/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" title="type core::iter::traits::iterator::Iterator::Item">Item</a>) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.80.0/std/primitive.bool.html">bool</a>,</div></h3></section><section id="impl-PeekingNext-for-MultiPeek%3CI%3E" class="impl"><a class="src rightside" href="../src/itertools/multipeek_impl.rs.html#68-89">source</a><a href="#impl-PeekingNext-for-MultiPeek%3CI%3E" class="anchor">§</a><h3 class="code-header">impl&lt;I&gt; <a class="trait" href="trait.PeekingNext.html" title="trait itertools::PeekingNext">PeekingNext</a> for <a class="struct" href="structs/struct.MultiPeek.html" title="struct itertools::structs::MultiPeek">MultiPeek</a>&lt;I&gt;<div class="where">where
I: <a class="trait" href="https://doc.rust-lang.org/1.80.0/core/iter/traits/iterator/trait.Iterator.html" title="trait core::iter::traits::iterator::Iterator">Iterator</a>,</div></h3></section><section id="impl-PeekingNext-for-PeekNth%3CI%3E" class="impl"><a class="src rightside" href="../src/itertools/peek_nth.rs.html#167-178">source</a><a href="#impl-PeekingNext-for-PeekNth%3CI%3E" class="anchor">§</a><h3 class="code-header">impl&lt;I&gt; <a class="trait" href="trait.PeekingNext.html" title="trait itertools::PeekingNext">PeekingNext</a> for <a class="struct" href="structs/struct.PeekNth.html" title="struct itertools::structs::PeekNth">PeekNth</a>&lt;I&gt;<div class="where">where
I: <a class="trait" href="https://doc.rust-lang.org/1.80.0/core/iter/traits/iterator/trait.Iterator.html" title="trait core::iter::traits::iterator::Iterator">Iterator</a>,</div></h3></section><section id="impl-PeekingNext-for-PutBack%3CI%3E" class="impl"><a class="src rightside" href="../src/itertools/peeking_take_while.rs.html#54-72">source</a><a href="#impl-PeekingNext-for-PutBack%3CI%3E" class="anchor">§</a><h3 class="code-header">impl&lt;I&gt; <a class="trait" href="trait.PeekingNext.html" title="trait itertools::PeekingNext">PeekingNext</a> for <a class="struct" href="structs/struct.PutBack.html" title="struct itertools::structs::PutBack">PutBack</a>&lt;I&gt;<div class="where">where
I: <a class="trait" href="https://doc.rust-lang.org/1.80.0/core/iter/traits/iterator/trait.Iterator.html" title="trait core::iter::traits::iterator::Iterator">Iterator</a>,</div></h3></section><section id="impl-PeekingNext-for-PutBackN%3CI%3E" class="impl"><a class="src rightside" href="../src/itertools/peeking_take_while.rs.html#75-93">source</a><a href="#impl-PeekingNext-for-PutBackN%3CI%3E" class="anchor">§</a><h3 class="code-header">impl&lt;I&gt; <a class="trait" href="trait.PeekingNext.html" title="trait itertools::PeekingNext">PeekingNext</a> for <a class="struct" href="structs/struct.PutBackN.html" title="struct itertools::structs::PutBackN">PutBackN</a>&lt;I&gt;<div class="where">where
I: <a class="trait" href="https://doc.rust-lang.org/1.80.0/core/iter/traits/iterator/trait.Iterator.html" title="trait core::iter::traits::iterator::Iterator">Iterator</a>,</div></h3></section><section id="impl-PeekingNext-for-RepeatN%3CT%3E" class="impl"><a class="src rightside" href="../src/itertools/peeking_take_while.rs.html#95-106">source</a><a href="#impl-PeekingNext-for-RepeatN%3CT%3E" class="anchor">§</a><h3 class="code-header">impl&lt;T: <a class="trait" href="https://doc.rust-lang.org/1.80.0/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a>&gt; <a class="trait" href="trait.PeekingNext.html" title="trait itertools::PeekingNext">PeekingNext</a> for <a class="struct" href="structs/struct.RepeatN.html" title="struct itertools::structs::RepeatN">RepeatN</a>&lt;T&gt;</h3></section></div><script src="../trait.impl/itertools/peeking_take_while/trait.PeekingNext.js" data-ignore-extern-crates="alloc,core" async></script></section></div></main></body></html>