pub struct FromFn<F>(/* private fields */)
where
F: Fn(&mut Formatter<'_>) -> Result<(), Error>;
๐ฌThis is a nightly-only experimental API. (
debug_closure_helpers
)Available on crate feature
std
only.Expand description
Implements fmt::Debug
and fmt::Display
using a function.
Created with from_fn
.
Trait Implementationsยง
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> UnwindSafe for FromFn<F>where
F: UnwindSafe,
Blanket Implementationsยง
Sourceยงimpl<T> ArchivePointee for T
impl<T> ArchivePointee for T
Sourceยงtype ArchivedMetadata = ()
type ArchivedMetadata = ()
The archived version of the pointer metadata for this type.
Sourceยงfn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata,
) -> <T as Pointee>::Metadata
fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata, ) -> <T as Pointee>::Metadata
Converts some archived metadata to the pointer metadata for itself.
Sourceยงimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Sourceยงfn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Sourceยงimpl<T> LayoutRaw for T
impl<T> LayoutRaw for T
Sourceยงfn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
Returns the layout of the type.