Struct RepeatN

struct RepeatN<A> { ... }

An iterator that repeats an element an exact number of times.

This struct is created by the [repeat_n()] function. See its documentation for more.

Implementations

impl<A> Freeze for RepeatN<A>

impl<A> RefUnwindSafe for RepeatN<A>

impl<A> Send for RepeatN<A>

impl<A> Sync for RepeatN<A>

impl<A> Unpin for RepeatN<A>

impl<A> UnsafeUnpin for RepeatN<A>

impl<A> UnwindSafe for RepeatN<A>

impl<A: $crate::clone::Clone> Clone for RepeatN<A>

fn clone(self: &Self) -> RepeatN<A>

impl<A: Clone> DoubleEndedIterator for RepeatN<A>

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

impl<A: Clone> ExactSizeIterator for RepeatN<A>

fn len(self: &Self) -> usize

impl<A: Clone> FusedIterator for RepeatN<A>

impl<A: Clone> Iterator for RepeatN<A>

fn next(self: &mut Self) -> Option<A>
fn size_hint(self: &Self) -> (usize, Option<usize>)
fn advance_by(self: &mut Self, skip: usize) -> Result<(), NonZero<usize>>
fn last(self: Self) -> Option<A>
fn count(self: Self) -> usize

impl<A: Clone> TrustedLen for RepeatN<A>

impl<A: fmt::Debug> Debug for RepeatN<A>

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

impl<I> IntoIterator for RepeatN<A>

fn into_iter(self: Self) -> I

impl<T> Any for RepeatN<A>

fn type_id(self: &Self) -> TypeId

impl<T> Borrow for RepeatN<A>

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

impl<T> BorrowMut for RepeatN<A>

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

impl<T> CloneToUninit for RepeatN<A>

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

impl<T> From for RepeatN<A>

fn from(t: T) -> T

Returns the argument unchanged.

impl<T, U> Into for RepeatN<A>

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 RepeatN<A>

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

impl<T, U> TryInto for RepeatN<A>

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