Struct FromFn

struct FromFn<F>(_)

An iterator where each iteration calls the provided closure F: FnMut() -> Option<T>.

This struct is created by the iter::from_fn() function. See its documentation for more.

Implementations

impl<F> Debug for FromFn<F>

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

impl<F> Freeze for FromFn<F>

impl<F> RefUnwindSafe for FromFn<F>

impl<F> Send for FromFn<F>

impl<F> Sync for FromFn<F>

impl<F> Unpin for FromFn<F>

impl<F> UnsafeUnpin for FromFn<F>

impl<F> UnwindSafe for FromFn<F>

impl<F: $crate::clone::Clone> Clone for FromFn<F>

fn clone(self: &Self) -> FromFn<F>

impl<I> IntoIterator for FromFn<F>

fn into_iter(self: Self) -> I

impl<T> Any for FromFn<F>

fn type_id(self: &Self) -> TypeId

impl<T> Borrow for FromFn<F>

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

impl<T> BorrowMut for FromFn<F>

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

impl<T> CloneToUninit for FromFn<F>

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

impl<T> From for FromFn<F>

fn from(t: T) -> T

Returns the argument unchanged.

impl<T, F> Iterator for FromFn<F>

fn next(self: &mut Self) -> Option<<Self as >::Item>

impl<T, U> Into for FromFn<F>

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 FromFn<F>

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

impl<T, U> TryInto for FromFn<F>

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