Cloned

Struct Cloned 

1.6.0 · Source
pub struct Cloned<I> { /* private fields */ }
Expand description

An iterator that clones the elements of an underlying iterator.

This struct is created by the cloned method on Iterator. See its documentation for more.

Trait Implementations§

1.1.0 · Source§

impl<I: Clone> Clone for Cloned<I>

Source§

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

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

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

Performs copy-assignment from source. Read more
1.1.0 · Source§

impl<'a, I, T> Iterator for Cloned<I>
where I: Iterator<Item = &'a T>, T: Clone + 'a,

Source§

type Item = T

The type of the elements being iterated over.
Source§

fn next(&mut self) -> Option<T>

Advances the iterator and returns the next value. Read more
Source§

fn size_hint(&self) -> (usize, Option<usize>)

Returns the bounds on the remaining length of the iterator. Read more
1.0.0 · Source§

fn map<B, F>(self, f: F) -> Map<Self, F>
where Self: Sized, F: FnMut(Self::Item) -> B,

Takes a closure and creates an iterator which calls that closure on each element. Read more
1.0.0 · Source§

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

Creates an iterator which clones all of its elements. Read more
Source§

impl<'a, I, T> TrustedLen for Cloned<I>
where I: TrustedLen<Item = &'a T>, T: Clone + 'a,

Auto Trait Implementations§

§

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

§

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

§

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

§

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

Blanket Implementations§

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<I> IntoIterator for I
where I: Iterator,

Source§

type Item = <I as Iterator>::Item

The type of the elements being iterated over.
Source§

type IntoIter = I

Which kind of iterator are we turning this into?
Source§

fn into_iter(self) -> I

Creates an iterator from a value. 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.