[][src]Struct std::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<A, F> FusedIterator for OnceWith<F> where
    F: FnOnce() -> A, 
[src]

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

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

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

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

impl<A, F> DoubleEndedIterator 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<F> Copy for OnceWith<F> where
    F: Copy
[src]

Auto Trait Implementations

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

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

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

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

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

Blanket Implementations

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

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> Into<U> for T where
    U: From<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<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> 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]

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

type Owned = T

The resulting type after obtaining ownership.