Function fmt_debug
Source pub const fn fmt_debug<T>(value: T) -> FmtDebug<T>
Expand description
Creates an object that Debug or Display a value based on its Debug implementation.
Example:
#[derive(Debug)]
struct Foo;
let fmt = fmt_tools::fmt_debug(Foo);
assert_eq!(format!("{fmt:?}"), "Foo");
assert_eq!(format!("{fmt}"), "Foo");