pub enum DocNode {
Empty,
Text(String),
Line(usize),
Cat(Box<DocNode>, Box<DocNode>),
Indent(usize, Box<DocNode>),
Group(Box<DocNode>),
}Expand description
A document algebra node.
Variants§
Empty
Empty document
Text(String)
A text string
Line(usize)
A newline followed by indentation
Cat(Box<DocNode>, Box<DocNode>)
Horizontal concatenation
Indent(usize, Box<DocNode>)
Nested indentation
Group(Box<DocNode>)
A group that prefers to be on one line
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl Freeze for DocNode
impl RefUnwindSafe for DocNode
impl Send for DocNode
impl Sync for DocNode
impl Unpin for DocNode
impl UnsafeUnpin for DocNode
impl UnwindSafe for DocNode
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