pub trait PeekableExt<'a, I: Iterator> {
// Required method
fn peek_take_while<P: FnMut(&I::Item) -> bool>(
&'a mut self,
predicate: P,
) -> PeekTakeWhile<'a, I, P> ⓘ;
}Required Methods§
Sourcefn peek_take_while<P: FnMut(&I::Item) -> bool>(
&'a mut self,
predicate: P,
) -> PeekTakeWhile<'a, I, P> ⓘ
fn peek_take_while<P: FnMut(&I::Item) -> bool>( &'a mut self, predicate: P, ) -> PeekTakeWhile<'a, I, P> ⓘ
Returns an iterator that takes elements from the underlying Peekable while the predicate is true. Unlike Iterator::take_while, this iterator does not consume the first element that does not satisfy the predicate.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".