pub fn debug_fn<F>(f: F) -> DebugFn<F>Expand description
Creates a type that implements Display and Debug from a closure.
ยงExample
use core::fmt::Display;
use debug_fn::debug_fn;
fn format_string(s: &str) -> impl Display + use<'_> {
debug_fn(move |f| f.write_str(s))
}