[][src]Struct fn_formats::DebugFmt

pub struct DebugFmt<Fmt>(pub Fmt)
where
    Fmt: Fn(&mut Formatter<'_>) -> Result
;

Implements Debug by calling the stored closure.

Example

use fn_formats::DebugFmt;

let debug = DebugFmt(|f| write!(f, "debug"));

assert_eq!(format!("{:?}", debug), "debug");

Trait Implementations

impl<Fmt: Clone> Clone for DebugFmt<Fmt> where
    Fmt: Fn(&mut Formatter<'_>) -> Result
[src]

impl<Fmt: Copy> Copy for DebugFmt<Fmt> where
    Fmt: Fn(&mut Formatter<'_>) -> Result
[src]

impl<Fmt: Fn(&mut Formatter<'_>) -> Result> Debug for DebugFmt<Fmt>[src]

impl<Fmt: Default> Default for DebugFmt<Fmt> where
    Fmt: Fn(&mut Formatter<'_>) -> Result
[src]

impl<Fmt: Eq> Eq for DebugFmt<Fmt> where
    Fmt: Fn(&mut Formatter<'_>) -> Result
[src]

impl<Fmt: Fn(&mut Formatter<'_>) -> Result> From<Fmt> for DebugFmt<Fmt>[src]

let _: fn_formats::DebugFmt<_> = (|f: &mut core::fmt::Formatter| Ok(())).into();

impl<Fmt: Hash> Hash for DebugFmt<Fmt> where
    Fmt: Fn(&mut Formatter<'_>) -> Result
[src]

impl<Fmt: Ord> Ord for DebugFmt<Fmt> where
    Fmt: Fn(&mut Formatter<'_>) -> Result
[src]

impl<Fmt: PartialEq> PartialEq<DebugFmt<Fmt>> for DebugFmt<Fmt> where
    Fmt: Fn(&mut Formatter<'_>) -> Result
[src]

impl<Fmt: PartialOrd> PartialOrd<DebugFmt<Fmt>> for DebugFmt<Fmt> where
    Fmt: Fn(&mut Formatter<'_>) -> Result
[src]

impl<Fmt> StructuralEq for DebugFmt<Fmt> where
    Fmt: Fn(&mut Formatter<'_>) -> Result
[src]

impl<Fmt> StructuralPartialEq for DebugFmt<Fmt> where
    Fmt: Fn(&mut Formatter<'_>) -> Result
[src]

Auto Trait Implementations

impl<Fmt> Send for DebugFmt<Fmt> where
    Fmt: Send

impl<Fmt> Sync for DebugFmt<Fmt> where
    Fmt: Sync

impl<Fmt> Unpin for DebugFmt<Fmt> where
    Fmt: Unpin

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<!> for T[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.