LazyCopied

Struct LazyCopied 

Source
pub struct LazyCopied<I> { /* private fields */ }

Trait Implementations§

Source§

impl<I: Clone> Clone for LazyCopied<I>

Source§

fn clone(&self) -> LazyCopied<I>

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<'a, I, T> Consumer for LazyCopied<I>
where T: 'a + Copy, I: Consumer<Item = &'a T>,

Source§

impl<I: Debug> Debug for LazyCopied<I>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'a, I, T> Iterable for LazyCopied<I>
where T: 'a + Copy, I: Iterable<Item = &'a T>,

Source§

type C = <I as Iterable>::CC<T>

Source§

type CC<U> = <I as Iterable>::CC<U>

Source§

type F = <I as Iterable>::CF<T>

Source§

type CF<U> = <I as Iterable>::CF<U>

Source§

fn count(self) -> usize
where Self: Sized,

Source§

fn last(self) -> Option<Self::Item>
where Self: Sized,

Source§

fn nth(self, n: usize) -> Option<Self::Item>
where Self: Sized,

Source§

fn step_by(self, step: usize) -> Self::C
where Self: Sized, Self::C: Producer<Self::Item>,

Source§

fn chain(self, other: impl Consumer<Item = Self::Item>) -> Self::C
where Self: Sized, Self::C: Producer<Self::Item>,

Source§

fn zip<E>(self, other: impl Consumer<Item = E>) -> Self::CC<(Self::Item, E)>
where Self: Sized, Self::CC<(Self::Item, E)>: Producer<(Self::Item, E)>,

Source§

fn map<U>(self, f: impl Fn(Self::Item) -> U) -> Self::CF<U>
where Self: Sized, Self::CF<U>: Producer<U>,

Source§

fn foreach(self, f: impl Fn(Self::Item))
where Self: Sized,

Source§

fn filter(self, f: impl Fn(&Self::Item) -> bool) -> Self::C
where Self: Sized, Self::C: Producer<Self::Item>,

Source§

fn filter_map<U>(self, f: impl Fn(Self::Item) -> Option<U>) -> Self::CC<U>
where Self: Sized, Self::CC<U>: Producer<U>,

Source§

fn enumerate(self) -> Self::CF<(usize, Self::Item)>
where Self: Sized, Self::CF<(usize, Self::Item)>: Producer<(usize, Self::Item)>,

Source§

fn skip_while(self, f: impl Fn(&Self::Item) -> bool) -> Self::C
where Self: Sized, Self::C: Producer<Self::Item>,

Source§

fn take_while(self, f: impl Fn(&Self::Item) -> bool) -> Self::C
where Self: Sized, Self::C: Producer<Self::Item>,

Source§

fn map_while<U>(self, f: impl Fn(Self::Item) -> Option<U>) -> Self::CC<U>
where Self: Sized, Self::CC<U>: Producer<U>,

Source§

fn skip(self, n: usize) -> Self::C
where Self: Sized, Self::C: Producer<Self::Item>,

Source§

fn take(self, n: usize) -> Self::C
where Self: Sized, Self::C: Producer<Self::Item>,

Source§

fn scan<S>(self, state: S, f: impl Fn(S, Self::Item) -> S) -> Self::CC<S>
where S: Clone, Self: Sized, Self::CC<S>: Producer<S>,

Source§

fn flat_map<U>(self, f: impl Fn(Self::Item) -> U) -> Self::CC<U::Item>
where U: Consumer, Self: Sized, Self::CC<U::Item>: Producer<U::Item>,

Source§

fn flatten(self) -> Self::CC<<Self::Item as Consumer>::Item>
where Self: Sized, Self::Item: Consumer, Self::CC<<Self::Item as Consumer>::Item>: Producer<<Self::Item as Consumer>::Item>,

Source§

fn by_ref(&self) -> &Self

Source§

fn partition(self, f: impl Fn(&Self::Item) -> bool) -> (Self::C, Self::C)
where Self: Sized, Self::C: GrowableProducer<Self::Item>,

Source§

fn try_fold<S, R>(self, init: S, f: impl Fn(S, Self::Item) -> R) -> R::Map<S>
where Self: Sized, R: TryExt<Output = S>,

Source§

fn try_for_each<R>(self, f: impl Fn(Self::Item) -> R) -> R::Map<()>
where Self: Sized, R: TryExt<Output = ()>,

Source§

fn fold<S>(self, init: S, f: impl Fn(S, Self::Item) -> S) -> S
where Self: Sized,

Source§

fn all(self, f: impl Fn(Self::Item) -> bool) -> bool
where Self: Sized,

Source§

fn any(self, f: impl Fn(Self::Item) -> bool) -> bool
where Self: Sized,

Source§

fn find(self, f: impl Fn(&Self::Item) -> bool) -> Option<Self::Item>
where Self: Sized,

Source§

fn find_map<B>(self, f: impl Fn(Self::Item) -> Option<B>) -> Option<B>
where Self: Sized,

Source§

fn position(self, f: impl Fn(Self::Item) -> bool) -> Option<usize>
where Self: Sized,

Source§

fn rposition(self, f: impl Fn(Self::Item) -> bool) -> Option<usize>

Source§

fn max(self) -> Option<Self::Item>
where Self: Sized, Self::Item: Ord,

Source§

fn min(self) -> Option<Self::Item>
where Self: Sized, Self::Item: Ord,

Source§

fn max_by_key<B>(self, f: impl Fn(&Self::Item) -> B) -> Option<Self::Item>
where Self: Sized, B: Ord,

Source§

fn max_by( self, f: impl Fn(&Self::Item, &Self::Item) -> Ordering, ) -> Option<Self::Item>
where Self: Sized,

Source§

fn min_by_key<B>(self, f: impl Fn(&Self::Item) -> B) -> Option<Self::Item>
where Self: Sized, B: Ord,

Source§

fn min_by( self, f: impl Fn(&Self::Item, &Self::Item) -> Ordering, ) -> Option<Self::Item>
where Self: Sized,

Source§

fn unzip<A, B>(self) -> (Self::CF<A>, Self::CF<B>)
where Self: Sized + Consumer<Item = (A, B)>, Self::CF<A>: GrowableProducer<A>, Self::CF<B>: GrowableProducer<B>,

Source§

fn copied<'a, T>(self) -> Self::CF<T>
where T: 'a + Copy, Self: Sized + Consumer<Item = &'a T>, Self::CF<T>: Producer<T>,

Source§

fn cloned<'a, T>(self) -> Self::CF<T>
where T: 'a + Clone, Self: Sized + Consumer<Item = &'a T>, Self::CF<T>: Producer<T>,

Source§

fn sum<S>(self) -> S
where Self: Sized, S: Sum<Self::Item>,

Source§

fn product<S>(self) -> S
where Self: Sized, S: Product<Self::Item>,

Source§

fn cmp<I>(self, other: I) -> Ordering
where I: Consumer<Item = Self::Item>, Self: Sized, Self::Item: Ord,

Source§

fn partial_cmp<I>(self, other: I) -> Option<Ordering>
where I: Consumer, Self: Sized, Self::Item: PartialOrd<<I as Consumer>::Item>,

Source§

fn eq<I>(self, other: I) -> bool
where I: Consumer, Self: Sized, Self::Item: PartialEq<<I as Consumer>::Item>,

Source§

fn ne<I>(self, other: I) -> bool
where I: Consumer, Self: Sized, Self::Item: PartialEq<<I as Consumer>::Item>,

Source§

fn lt<I>(self, other: I) -> bool
where I: Consumer, Self: Sized, Self::Item: PartialOrd<<I as Consumer>::Item>,

Source§

fn le<I>(self, other: I) -> bool
where I: Consumer, Self: Sized, Self::Item: PartialOrd<<I as Consumer>::Item>,

Source§

fn gt<I>(self, other: I) -> bool
where I: Consumer, Self: Sized, Self::Item: PartialOrd<<I as Consumer>::Item>,

Source§

fn ge<I>(self, other: I) -> bool
where I: Consumer, Self: Sized, Self::Item: PartialOrd<<I as Consumer>::Item>,

Source§

fn join(self, sep: &str) -> String
where Self: Sized, Self::Item: Display,

Source§

fn add_one(self, a: Self::Item) -> Self::C
where Self: Sized, Self::C: GrowableProducer<Self::Item>,

Source§

fn try_add_one<R>(self, r: R) -> R::Map<Self::C>
where R: TryExt<Output = Self::Item>, Self: Sized, Self::C: GrowableProducer<Self::Item>,

Source§

fn try_map<B, R, F>(self, f: F) -> R::Map<Self::CC<B>>
where F: Fn(Self::Item) -> R, R: TryExt<Output = B>, Self: Sized, Self::CC<B>: GrowableProducer<B>,

Source§

fn try_flat_map<B, R, F>(self, f: F) -> R::Map<Self::CC<B::Item>>
where F: Fn(Self::Item) -> R, R: TryExt<Output = B>, B: Consumer, Self: Sized, Self::CC<B::Item>: GrowableProducer<B::Item>,

Source§

fn try_flatten( self, ) -> <Self::Item as TryExt>::Map<Self::CC<<<Self::Item as TryExt>::Output as Consumer>::Item>>
where Self: Sized, Self::Item: TryExt, <Self::Item as TryExt>::Output: Consumer, Self::CC<<<Self::Item as TryExt>::Output as Consumer>::Item>: GrowableProducer<<<Self::Item as TryExt>::Output as Consumer>::Item>,

Source§

fn lazy_step_by(self, step: usize) -> LazyStepBy<Self>
where Self: Sized,

Source§

fn lazy_chain<C: Consumer>(self, c: C) -> LazyChain<Self, C>
where Self: Sized,

Source§

fn lazy_zip<C: Consumer>(self, c: C) -> LazyZip<Self, C>
where Self: Sized,

Source§

fn lazy_filter<F: Fn(&Self::Item) -> bool>(self, f: F) -> LazyFilter<Self, F>
where Self: Sized,

Source§

fn lazy_map<T, F: Fn(Self::Item) -> T>(self, f: F) -> LazyMap<Self, F>
where Self: Sized,

Source§

fn lazy_filter_map<T, F: Fn(Self::Item) -> Option<T>>( self, f: F, ) -> LazyFilterMap<Self, F>
where Self: Sized,

Source§

fn lazy_enumerate(self) -> LazyEnumerate<Self>
where Self: Sized,

Source§

fn lazy_skip_while<F: Fn(&Self::Item) -> bool>( self, f: F, ) -> LazySkipWhile<Self, F>
where Self: Sized,

Source§

fn lazy_map_while<T, F: Fn(Self::Item) -> Option<T>>( self, f: F, ) -> LazyMapWhile<Self, F>
where Self: Sized,

Source§

fn lazy_skip(self, n: usize) -> LazySkip<Self>
where Self: Sized,

Source§

fn lazy_take(self, n: usize) -> LazyTake<Self>
where Self: Sized,

Source§

fn lazy_scan<S, F: Fn(S, Self::Item) -> S>( self, state: S, f: F, ) -> LazyScan<S, Self, F>
where Self: Sized,

Source§

fn lazy_flat_map<T: Consumer, F: Fn(Self::Item) -> T>( self, f: F, ) -> LazyFlatMap<Self, F>
where Self: Sized,

Source§

fn lazy_flatten(self) -> LazyFlatten<Self>
where Self: Sized, Self::Item: Consumer,

Source§

fn lazy_copied<'a, T>(self) -> LazyCopied<Self>
where T: 'a + Copy, Self: Sized + Consumer<Item = &'a T>,

Source§

fn lazy_cloned<'a, T>(self) -> LazyCloned<Self>
where T: 'a + Clone, Self: Sized + Consumer<Item = &'a T>,

Source§

fn lazy_cycle(self) -> LazyCycle<Self>
where Self: Sized, Self::IntoIter: Clone,

Source§

impl<'a, I, T> IterableSeq for LazyCopied<I>
where T: 'a + Copy, I: IterableSeq<Item = &'a T>,

Source§

fn rev(self) -> Self::F
where Self: Sized, Self::F: Producer<Self::Item>, Self::IntoIter: DoubleEndedIterator,

Source§

fn sorted(self) -> Self::F
where Self: Sized, Self::Item: Ord, Self::F: Producer<Self::Item>,

Source§

fn sorted_by<F>(self, f: F) -> Self::F
where F: Fn(&Self::Item, &Self::Item) -> Ordering, Self: Sized, Self::F: Producer<Self::Item>,

Source§

fn sorted_by_key<K, F>(self, f: F) -> Self::F
where K: Ord, F: Fn(&Self::Item) -> K, Self: Sized, Self::F: Producer<Self::Item>,

Source§

fn lazy_rev(self) -> LazyRev<Self>
where Self: Sized, Self::IntoIter: DoubleEndedIterator,

Auto Trait Implementations§

§

impl<I> Freeze for LazyCopied<I>
where I: Freeze,

§

impl<I> RefUnwindSafe for LazyCopied<I>
where I: RefUnwindSafe,

§

impl<I> Send for LazyCopied<I>
where I: Send,

§

impl<I> Sync for LazyCopied<I>
where I: Sync,

§

impl<I> Unpin for LazyCopied<I>
where I: Unpin,

§

impl<I> UnwindSafe for LazyCopied<I>
where I: UnwindSafe,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.