Trait otter_api_tests::imports::otter_base::imports::itertools::PeekingNext [−][src]
pub trait PeekingNext: Iterator { fn peeking_next<F>(&mut self, accept: F) -> Option<Self::Item>
where
F: FnOnce(&Self::Item) -> bool; }
Expand description
An iterator that allows peeking at an element before deciding to accept it.
See .peeking_take_while()
for more information.
This is implemented by peeking adaptors like peekable and put back,
but also by a few iterators that can be peeked natively, like the slice’s
by reference iterator (std::slice::Iter
).
Required methods
Implementations on Foreign Types
Implementors
pub fn peeking_next<F>(
&mut self,
accept: F
) -> Option<<CharIndices<'a> as Iterator>::Item> where
F: FnOnce(&<CharIndices<'a> as Iterator>::Item) -> bool,
[src]