spirt::print::pretty

Function join_space

source
pub fn join_space(
    header: impl Into<Node>,
    contents: impl IntoIterator<Item = impl Into<Fragment>>,
) -> Fragment
Expand description

Constructs the Fragment corresponding to one of:

  • inline layout: header + " " + contents.join(" ")
  • block layout: header + "\n" + indent(contents).join("\n")