pub fn as_append<C: Cost>(x: Doc<C>, y: Doc<C>) -> Doc<C>Expand description
Concatenates two documents horizontally with spacing and alignment.
Similar to a_append, but with a space included between the documents.
To combine more than two documents or an iterator of documents, use
as_concat.
Equivalent to x & space() & align(y).
ยงExample
let doc = as_append(nl() & text("hello"),
text("my") & nl() & text("friend"));
assert_eq!(doc.to_string(), r"
hello my
friend");