pub fn or_dash<T: Display>(value: Option<T>) -> impl Display
Formats an optional log field: the value itself, or ABSENT.
ABSENT
assert_eq!(or_dash(Some("h3")).to_string(), "h3"); assert_eq!(or_dash(None::<&str>).to_string(), "-");