Struct

core::iter::TakeWhile

source
forall I, T, Env where Copy[T].
exposed struct TakeWhile {
    inner: I,
    pred: closure[Env](T) -> bool,
    done: bool,
}

Items while pred keeps them; the first it rejects ends the iterator and is dropped (Copy[T]).

Instances

instance Iterator[TakeWhile[I, T, Env] -> T]source

forall I, T, Env where Iterator[I -> T], Copy[T], Copy[Env].
instance Iterator[TakeWhile[I, T, Env] -> T] { ... }

In core::iter.

take_while: the next item while pred holds of it.