v_append

Function v_append 

Source
pub fn v_append<C: Cost>(x: Doc<C>, y: Doc<C>) -> Doc<C>
Expand description

Concatenates two documents vertically.

The documents will be separated by an unflattenable newline. To combine more than two documents or an iterator of documents, use v_concat.

Equivalent to x & hard_nl() & y.

ยงExample

let doc = v_append(text("hello"), text("world"));
assert_eq!(doc.to_string(), "hello\nworld");