Struct Once

struct Once<T> { ... }

An iterator that yields an element exactly once.

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

Implementations

impl<I> IntoIterator for Once<T>

fn into_iter(self: Self) -> I

impl<T> Any for Once<T>

fn type_id(self: &Self) -> TypeId

impl<T> Borrow for Once<T>

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

impl<T> BorrowMut for Once<T>

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

impl<T> CloneToUninit for Once<T>

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

impl<T> DoubleEndedIterator for Once<T>

fn next_back(self: &mut Self) -> Option<T>

impl<T> ExactSizeIterator for Once<T>

fn len(self: &Self) -> usize

impl<T> Freeze for Once<T>

impl<T> From for Once<T>

fn from(t: T) -> T

Returns the argument unchanged.

impl<T> FusedIterator for Once<T>

impl<T> Iterator for Once<T>

fn next(self: &mut Self) -> Option<T>
fn size_hint(self: &Self) -> (usize, Option<usize>)

impl<T> RefUnwindSafe for Once<T>

impl<T> Send for Once<T>

impl<T> Sync for Once<T>

impl<T> TrustedLen for Once<T>

impl<T> Unpin for Once<T>

impl<T> UnsafeUnpin for Once<T>

impl<T> UnwindSafe for Once<T>

impl<T, U> Into for Once<T>

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 Once<T>

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

impl<T, U> TryInto for Once<T>

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

impl<T: $crate::clone::Clone> Clone for Once<T>

fn clone(self: &Self) -> Once<T>

impl<T: $crate::fmt::Debug> Debug for Once<T>

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