Struct Copied

struct Copied<I> { ... }

An iterator that copies the elements of an underlying iterator.

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

Implementations

impl<'a, I, T> DoubleEndedIterator for Copied<I>

fn next_back(self: &mut Self) -> Option<T>
fn try_rfold<B, F, R>(self: &mut Self, init: B, f: F) -> R
where
    Self: Sized,
    F: FnMut(B, <Self as >::Item) -> R,
    R: Try<Output = B>
fn rfold<Acc, F>(self: Self, init: Acc, f: F) -> Acc
where
    F: FnMut(Acc, <Self as >::Item) -> Acc
fn advance_back_by(self: &mut Self, n: usize) -> Result<(), NonZero<usize>>

impl<'a, I, T> ExactSizeIterator for Copied<I>

fn len(self: &Self) -> usize
fn is_empty(self: &Self) -> bool

impl<'a, I, T> FusedIterator for Copied<I>

impl<'a, I, T> Iterator for Copied<I>

fn next(self: &mut Self) -> Option<T>
fn next_chunk<N: usize>(self: &mut Self) -> Result<[<Self as >::Item; N], IntoIter<<Self as >::Item, N>>
where
    Self: Sized
fn size_hint(self: &Self) -> (usize, Option<usize>)
fn try_fold<B, F, R>(self: &mut Self, init: B, f: F) -> R
where
    Self: Sized,
    F: FnMut(B, <Self as >::Item) -> R,
    R: Try<Output = B>
fn fold<Acc, F>(self: Self, init: Acc, f: F) -> Acc
where
    F: FnMut(Acc, <Self as >::Item) -> Acc
fn nth(self: &mut Self, n: usize) -> Option<T>
fn last(self: Self) -> Option<T>
fn count(self: Self) -> usize
fn advance_by(self: &mut Self, n: usize) -> Result<(), NonZero<usize>>

impl<'a, I, T> TrustedLen for Copied<I>

impl<I> Freeze for Copied<I>

impl<I> IntoIterator for Copied<I>

fn into_iter(self: Self) -> I

impl<I> RefUnwindSafe for Copied<I>

impl<I> Send for Copied<I>

impl<I> Sync for Copied<I>

impl<I> Unpin for Copied<I>

impl<I> UnsafeUnpin for Copied<I>

impl<I> UnwindSafe for Copied<I>

impl<I: $crate::clone::Clone> Clone for Copied<I>

fn clone(self: &Self) -> Copied<I>

impl<I: $crate::fmt::Debug> Debug for Copied<I>

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

impl<I: Default> Default for Copied<I>

fn default() -> Self

Creates a Copied iterator from the default value of I

# use core::slice;
# use core::iter::Copied;
let iter: Copied<slice::Iter<'_, u8>> = Default::default();
assert_eq!(iter.len(), 0);

impl<T> Any for Copied<I>

fn type_id(self: &Self) -> TypeId

impl<T> Borrow for Copied<I>

fn borrow(self: &Self) -> &T

impl<T> BorrowMut for Copied<I>

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

impl<T> CloneToUninit for Copied<I>

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

impl<T> From for Copied<I>

fn from(t: T) -> T

Returns the argument unchanged.

impl<T, U> Into for Copied<I>

fn into(self: Self) -> U

Calls U::from(self).

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

impl<T, U> TryFrom for Copied<I>

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

impl<T, U> TryInto for Copied<I>

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