Struct FromFn
pub struct FromFn<F>(pub(in ::iter::sources::from_fn) 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.
Fields
0: F
Trait Implementations
impl<F> Debug for FromFn<F>
fn fmt(&self, f: &mut Formatter<'_>) -> Result
impl<F: Clone> Clone for FromFn<F>
fn clone(&self) -> FromFn<F>
impl<T, F> Iterator for FromFn<F>
where
F: FnMut() -> Option<T>,
type Item = T;fn next(&mut self) -> Option<Self::Item>
Auto Trait Implementations
impl<F> Freeze for FromFn<F>
where
F: Freeze,
impl<F> RefUnwindSafe for FromFn<F>
where
F: RefUnwindSafe,
impl<F> Send for FromFn<F>
where
F: Send,
impl<F> Sync for FromFn<F>
where
F: Sync,
impl<F> Unpin for FromFn<F>
where
F: Unpin,
impl<F> UnsafeUnpin for FromFn<F>
where
F: UnsafeUnpin,
impl<F> UnwindSafe for FromFn<F>
where
F: UnwindSafe,
Blanket Implementations
impl<I> IntoIterator for FromFn<F>
where
I: Iterator,
type Item = <I as Iterator>::Item;type IntoIter = I;fn into_iter(self) -> I
impl<T> Any for FromFn<F>
where
T: 'static + ?Sized,
fn type_id(&self) -> TypeId
impl<T> Borrow<T> for FromFn<F>
where
T: ?Sized,
fn borrow(&self) -> &T
impl<T> BorrowMut<T> for FromFn<F>
where
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
impl<T> CloneToUninit for FromFn<F>
where
T: Clone,
unsafe fn clone_to_uninit(&self, dest: *mut u8)
impl<T> From<T> for FromFn<F>
fn from(t: T) -> TReturns the argument unchanged.
impl<T> SizeHint for FromFn<F>
where
T: ?Sized,
fn lower_bound(&self) -> usizefn upper_bound(&self) -> Option<usize>
impl<T> SizedTypeProperties for FromFn<F>
impl<T, U> Into<U> for FromFn<F>
where
U: From<T>,
fn into(self) -> UCalls
U::from(self).That is, this conversion is whatever the implementation of
[From]<T> for Uchooses to do.
impl<T, U> TryFrom<U> for FromFn<F>
where
U: Into<T>,
type Error = Infallible;fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
impl<T, U> TryInto<U> for FromFn<F>
where
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error;fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>