fmt_display_list

Function fmt_display_list 

Source
pub const fn fmt_display_list<F, I>(values_fn: F) -> FmtDisplayList<F>
where F: Fn() -> I, I: IntoIterator, I::Item: Display,
Expand description

Creates an object that Debug or Display a list of Display objects as a list.

Example:

let fmt = fmt_tools::fmt_display_list(|| 'a'..'g');

assert_eq!(format!("{fmt:?}"), "[a, b, c, d, e, f]");
assert_eq!(format!("{fmt}"), "[a, b, c, d, e, f]");