pub enum Doc {
Empty,
Text(String),
Concat(Box<Doc>, Box<Doc>),
Line,
Nest(usize, Box<Doc>),
Union(Box<Doc>, Box<Doc>),
}Expand description
An indented document for pretty-printing with line wrapping.
Variants§
Empty
Empty document.
Text(String)
A text fragment.
Concat(Box<Doc>, Box<Doc>)
Append two documents.
Line
A line break; collapses to a space when flattened.
Nest(usize, Box<Doc>)
Indented document.
Union(Box<Doc>, Box<Doc>)
Choose between two layouts.
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Doc
impl RefUnwindSafe for Doc
impl Send for Doc
impl Sync for Doc
impl Unpin for Doc
impl UnsafeUnpin for Doc
impl UnwindSafe for Doc
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more