Struct FromFn
pub struct FromFn<F>(pub(in ::fmt::builders) F);
Implements fmt::Debug and fmt::Display via the provided closure.
Created with from_fn.
Fields
0: F
Trait Implementations
impl<F> Debug for FromFn<F>
where
F: Fn(&mut Formatter<'_>) -> Result,
fn fmt(&self, f: &mut Formatter<'_>) -> Result
impl<F> Display for FromFn<F>
where
F: Fn(&mut Formatter<'_>) -> Result,
fn fmt(&self, f: &mut Formatter<'_>) -> Result
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<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> 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>