pub enum PrettyDoc {
Text(String),
Newline,
Indent(Box<PrettyDoc>),
Concat(Box<PrettyDoc>, Box<PrettyDoc>),
Group(Box<PrettyDoc>),
Empty,
}Expand description
An abstract pretty-print document.
Variants§
Text(String)
A literal text string.
Newline
A newline followed by indentation.
Indent(Box<PrettyDoc>)
Increase indentation for nested content.
Concat(Box<PrettyDoc>, Box<PrettyDoc>)
Concatenation of two documents.
Group(Box<PrettyDoc>)
A group: try to fit on one line, break if too long.
Empty
An empty document.
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl Freeze for PrettyDoc
impl RefUnwindSafe for PrettyDoc
impl Send for PrettyDoc
impl Sync for PrettyDoc
impl Unpin for PrettyDoc
impl UnsafeUnpin for PrettyDoc
impl UnwindSafe for PrettyDoc
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