[][src]Struct core::iter::OnceWith

pub struct OnceWith<F> { /* fields omitted */ }
🔬 This is a nightly-only experimental API. (iter_once_with #57581)

An iterator that yields a single element of type A by applying the provided closure F: FnOnce() -> A.

This struct is created by the once_with function. See its documentation for more.

Trait Implementations

impl<F: Copy> Copy for OnceWith<F>[src]

impl<F: Clone> Clone for OnceWith<F>[src]

impl<A, F: FnOnce() -> A> Iterator for OnceWith<F>[src]

type Item = A

The type of the elements being iterated over.

impl<A, F: FnOnce() -> A> DoubleEndedIterator for OnceWith<F>[src]

impl<A, F: FnOnce() -> A> ExactSizeIterator for OnceWith<F>[src]

impl<A, F: FnOnce() -> A> FusedIterator for OnceWith<F>[src]

impl<A, F: FnOnce() -> A> TrustedLen for OnceWith<F>[src]

impl<F: Debug> Debug for OnceWith<F>[src]

Auto Trait Implementations

impl<F> Send for OnceWith<F> where
    F: Send

impl<F> Sync for OnceWith<F> where
    F: Sync

impl<F> Unpin for OnceWith<F> where
    F: Unpin

Blanket Implementations

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = !

The type returned in the event of a conversion error.

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]