Function from_fn
#[must_use = "returns a type implementing Debug and Display, which do not have any effects unless they are used"]
pub const fn from_fn<F: Fn(&mut Formatter<'_>) -> Result>(f: F) -> FromFn<F>
Creates a type whose fmt::Debug and fmt::Display impls are
forwarded to the provided closure.
Examples
use fmt;
let value = 'a';
assert_eq!;
assert_eq!;
let wrapped = from_fn;
assert_eq!;
assert_eq!;