pub fn display_container<T: Display, Iter: ExactSizeIterator<Item = T>>(
f: &mut Formatter<'_>,
prefix: &str,
suffix: &str,
items: Iter
) -> Result
Expand description
Helper for display implementation of starlark container-y types.
For “normal” display, produces output like (with prefix="prefix[", suffix="]"
):
prefix[]
prefix[1]
prefix[1, 2]
For “alternate” display, produces output like:
prefix[]
prefix[ 1 ]
ⓘ
prefix[
1,
2
]
This doesn’t propagate the flags on the Formatter other than alternate.