Struct OnceWith
struct OnceWith<F> { ... }
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.
Implementations
impl<A, F: FnOnce() -> A> DoubleEndedIterator for OnceWith<F>
fn next_back(self: &mut Self) -> Option<A>
impl<A, F: FnOnce() -> A> ExactSizeIterator for OnceWith<F>
fn len(self: &Self) -> usize
impl<A, F: FnOnce() -> A> FusedIterator for OnceWith<F>
impl<A, F: FnOnce() -> A> Iterator for OnceWith<F>
fn next(self: &mut Self) -> Option<A>fn size_hint(self: &Self) -> (usize, Option<usize>)
impl<A, F: FnOnce() -> A> TrustedLen for OnceWith<F>
impl<F> Debug for OnceWith<F>
fn fmt(self: &Self, f: &mut Formatter<'_>) -> Result
impl<F> Freeze for OnceWith<F>
impl<F> RefUnwindSafe for OnceWith<F>
impl<F> Send for OnceWith<F>
impl<F> Sync for OnceWith<F>
impl<F> Unpin for OnceWith<F>
impl<F> UnsafeUnpin for OnceWith<F>
impl<F> UnwindSafe for OnceWith<F>
impl<F: $crate::clone::Clone> Clone for OnceWith<F>
fn clone(self: &Self) -> OnceWith<F>
impl<I> IntoIterator for OnceWith<F>
fn into_iter(self: Self) -> I
impl<T> Any for OnceWith<F>
fn type_id(self: &Self) -> TypeId
impl<T> Borrow for OnceWith<F>
fn borrow(self: &Self) -> &T
impl<T> BorrowMut for OnceWith<F>
fn borrow_mut(self: &mut Self) -> &mut T
impl<T> CloneToUninit for OnceWith<F>
unsafe fn clone_to_uninit(self: &Self, dest: *mut u8)
impl<T> From for OnceWith<F>
fn from(t: T) -> TReturns the argument unchanged.
impl<T, U> Into for OnceWith<F>
fn into(self: Self) -> UCalls
U::from(self).That is, this conversion is whatever the implementation of
[From]<T> for Uchooses to do.
impl<T, U> TryFrom for OnceWith<F>
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
impl<T, U> TryInto for OnceWith<F>
fn try_into(self: Self) -> Result<U, <U as TryFrom<T>>::Error>