pub enum Document<'a> {
Break {
broken: bool,
document: &'a Document<'a>,
},
Indent(&'a Document<'a>),
Line,
LineSuffix(&'a str),
Offside {
document: &'a Document<'a>,
soft: bool,
},
Sequence(&'a [Document<'a>]),
String(&'a str),
}
Expand description
A document.
Variants§
Break
A document broken into multiple lines.
Indent(&'a Document<'a>)
An indented document.
Line
A line.
A formatter considers it as a space if a document is not broken by
Break
.
LineSuffix(&'a str)
A line suffix.
Offside
A document indented to a current column.
If it is soft
, an indent becomes equal to or more than a current
indent.
Sequence(&'a [Document<'a>])
A sequence of documents.
String(&'a str)
A string.
Trait Implementations§
source§impl<'a> PartialEq for Document<'a>
impl<'a> PartialEq for Document<'a>
impl<'a> StructuralPartialEq for Document<'a>
Auto Trait Implementations§
impl<'a> RefUnwindSafe for Document<'a>
impl<'a> Send for Document<'a>
impl<'a> Sync for Document<'a>
impl<'a> Unpin for Document<'a>
impl<'a> UnwindSafe for Document<'a>
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