Struct sp_std::iter::OnceWith1.43.0[][src]

pub struct OnceWith<F> { /* fields omitted */ }

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> Clone for OnceWith<F> where
    F: Clone
[src]

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

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

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

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

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

type Item = A

The type of the elements being iterated over.

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

Auto Trait Implementations

impl<F> RefUnwindSafe for OnceWith<F> where
    F: RefUnwindSafe
[src]

impl<F> Send for OnceWith<F> where
    F: Send
[src]

impl<F> Sync for OnceWith<F> where
    F: Sync
[src]

impl<F> Unpin for OnceWith<F> where
    F: Unpin
[src]

impl<F> UnwindSafe for OnceWith<F> where
    F: UnwindSafe
[src]

Blanket Implementations

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

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

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

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

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

impl<I> IntoIterator for I where
    I: Iterator
[src]

type Item = <I as Iterator>::Item

The type of the elements being iterated over.

type IntoIter = I

Which kind of iterator are we turning this into?

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

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

type Error = Infallible

The type returned in the event of a conversion error.

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.