pub struct FromFn<F>(/* private fields */)
where
F: Fn(&mut Formatter<'_>) -> Result<(), Error>;
🔬This is a nightly-only experimental API. (
debug_closure_helpers
)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> AsCleanDebug for Twhere
T: Display,
impl<T> AsCleanDebug for Twhere
T: Display,
source§fn as_clean(&self) -> CleanDebug<'_, Self>where
Self: Display,
fn as_clean(&self) -> CleanDebug<'_, Self>where
Self: Display,
Get a
CleanDebug
for Self. Read moresource§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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
§impl<T> Pointable for T
impl<T> Pointable for T
§impl<T> ToCompactString for Twhere
T: Display,
impl<T> ToCompactString for Twhere
T: Display,
§fn try_to_compact_string(&self) -> Result<CompactString, ToCompactStringError>
fn try_to_compact_string(&self) -> Result<CompactString, ToCompactStringError>
Fallible version of
ToCompactString::to_compact_string()
Read more§fn to_compact_string(&self) -> CompactString
fn to_compact_string(&self) -> CompactString
Converts the given value to a
CompactString
. Read more