pub enum Node {
Text(String, Span),
ParagraphBreak(Span),
Command {
name: String,
args: Vec<Arg>,
span: Span,
},
Group(Vec<Node>, Span),
Math(Vec<Node>, Span),
DisplayMath(Vec<Node>, Span),
Comment(String, Span),
AlignTab(Span),
Tilde(Span),
Environment {
name: String,
args: Vec<Arg>,
body: Vec<Node>,
span: Span,
},
}Variants§
Text(String, Span)
ParagraphBreak(Span)
Command
Group(Vec<Node>, Span)
Math(Vec<Node>, Span)
Inline match: $ ... $. The span covers both $ delimiters.
DisplayMath(Vec<Node>, Span)
Display math: \[ ... \]. The span covers both delimiters.
Comment(String, Span)
A % ... line comment. THe string is the body without the leading
% and without the trailing newline - the span covers the whole
run, including both. Comments in AST since they can actually affect produced PDF.
AlignTab(Span)
A & column separator inside tabular/array/align and other environments.
Tilde(Span)
A ~ - a non-breaking space. Acts like a regular space for layout
but forbids a line break at this point.
Environment
\begin{name} ... \end{name}. args is everything after the
environment name (optionals and additional mandatory groups). body
holds the parsed children; the span also covers the entire construct.
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Node
impl RefUnwindSafe for Node
impl Send for Node
impl Sync for Node
impl Unpin for Node
impl UnsafeUnpin for Node
impl UnwindSafe for Node
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