Struct SkipWhile
#[must_use = "iterators are lazy and do nothing unless consumed"]
pub struct SkipWhile<I, P> { pub(in ::iter::adapters::skip_while) iter: I, pub(in ::iter::adapters::skip_while) flag: bool, pub(in ::iter::adapters::skip_while) predicate: P }
An iterator that rejects elements while predicate returns true.
This struct is created by the skip_while method on Iterator. See its
documentation for more.
Fields
iter: Iflag: boolpredicate: P
Implementations
impl<I, P> SkipWhile<I, P>
const fn new(iter: I, predicate: P) -> SkipWhile<I, P>
Trait Implementations
impl<I, P> FusedIterator for SkipWhile<I, P>
where
I: FusedIterator,
P: FnMut(&I::Item) -> bool,
impl<I: Clone, P: Clone> Clone for SkipWhile<I, P>
fn clone(&self) -> SkipWhile<I, P>
impl<I: Debug, P> Debug for SkipWhile<I, P>
fn fmt(&self, f: &mut Formatter<'_>) -> Result
impl<I: InPlaceIterable, F> InPlaceIterable for SkipWhile<I, F>
const EXPAND_BY: Option<NonZero<usize>> = I::EXPAND_BY;const MERGE_BY: Option<NonZero<usize>> = I::MERGE_BY;
impl<I: Iterator, P> Iterator for SkipWhile<I, P>
where
P: FnMut(&I::Item) -> bool,
type Item = <I as Iterator>::Item;fn next(&mut self) -> Option<I::Item>fn size_hint(&self) -> (usize, Option<usize>)fn try_fold<Acc, Fold, R>(&mut self, init: Acc, fold: Fold) -> R where Self: Sized, Fold: FnMut(Acc, Self::Item) -> R, R: Try<Output = Acc>,fn fold<Acc, Fold>(self, init: Acc, fold: Fold) -> Acc where Fold: FnMut(Acc, Self::Item) -> Acc,
impl<I: TrustedFused, P> TrustedFused for SkipWhile<I, P>
impl<P, I> SourceIter for SkipWhile<I, P>
where
I: SourceIter,
type Source = <I as SourceIter>::Source;unsafe fn as_inner(&mut self) -> &mut I::Source
Auto Trait Implementations
impl<I, P> Freeze for SkipWhile<I, P>
where
I: Freeze,
P: Freeze,
impl<I, P> RefUnwindSafe for SkipWhile<I, P>
where
I: RefUnwindSafe,
P: RefUnwindSafe,
impl<I, P> Send for SkipWhile<I, P>
where
I: Send,
P: Send,
impl<I, P> Sync for SkipWhile<I, P>
where
I: Sync,
P: Sync,
impl<I, P> Unpin for SkipWhile<I, P>
where
I: Unpin,
P: Unpin,
impl<I, P> UnsafeUnpin for SkipWhile<I, P>
where
I: UnsafeUnpin,
P: UnsafeUnpin,
impl<I, P> UnwindSafe for SkipWhile<I, P>
where
I: UnwindSafe,
P: UnwindSafe,
Blanket Implementations
impl<I> IntoIterator for SkipWhile<I, P>
where
I: Iterator,
type Item = <I as Iterator>::Item;type IntoIter = I;fn into_iter(self) -> I
impl<T> Any for SkipWhile<I, P>
where
T: 'static + ?Sized,
fn type_id(&self) -> TypeId
impl<T> Borrow<T> for SkipWhile<I, P>
where
T: ?Sized,
fn borrow(&self) -> &T
impl<T> BorrowMut<T> for SkipWhile<I, P>
where
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
impl<T> CloneToUninit for SkipWhile<I, P>
where
T: Clone,
unsafe fn clone_to_uninit(&self, dest: *mut u8)
impl<T> From<T> for SkipWhile<I, P>
fn from(t: T) -> TReturns the argument unchanged.
impl<T> SizeHint for SkipWhile<I, P>
where
T: ?Sized,
fn lower_bound(&self) -> usizefn upper_bound(&self) -> Option<usize>
impl<T> SizedTypeProperties for SkipWhile<I, P>
impl<T, U> Into<U> for SkipWhile<I, P>
where
U: From<T>,
fn into(self) -> UCalls
U::from(self).That is, this conversion is whatever the implementation of
[From]<T> for Uchooses to do.
impl<T, U> TryFrom<U> for SkipWhile<I, P>
where
U: Into<T>,
type Error = Infallible;fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
impl<T, U> TryInto<U> for SkipWhile<I, P>
where
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error;fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>