Function spirt::print::pretty::join_comma_sep

source ·
pub fn join_comma_sep(
    prefix: impl Into<Node>,
    contents: impl IntoIterator<Item = impl Into<Fragment>>,
    suffix: impl Into<Node>
) -> Fragment
Expand description

Constructs the Fragment corresponding to one of:

  • inline layout: prefix + contents.join(", ") + suffix
  • block layout: prefix + "\n" + indent(contents).join(",\n") + ",\n" + suffix