pub enum MathNode<ET: EngineTypes, S: MathFontStyleT<ET>> {
Show 19 variants
Atom(MathAtom<ET, S>),
Penalty(i32),
Mark(usize, TokenList<ET::Token>),
Whatsit(WhatsitNode<ET>),
HSkip(Skip<ET::Dim>),
MSkip {
skip: MuSkip<ET::MuDim>,
style: S,
},
HFil,
HFill,
HFilneg,
Hss,
Space,
HKern(ET::Dim),
MKern {
kern: ET::MuDim,
style: S,
},
Leaders(Leaders<ET>),
VRule {
width: Option<ET::Dim>,
height: Option<ET::Dim>,
depth: Option<ET::Dim>,
start: SourceRef<ET>,
end: SourceRef<ET>,
},
Over {
start: SourceRef<ET>,
end: SourceRef<ET>,
top: Box<[MathNode<ET, S>]>,
sep: Option<ET::Dim>,
bottom: Box<[MathNode<ET, S>]>,
left: Option<(ET::Char, S)>,
right: Option<(ET::Char, S)>,
},
Choice(S::Choice),
Marker(S::Markers),
Custom(ET::CustomNode),
}Expand description
A math list node. Comes in two forms: an unresolved form, while the list is being
constructed and the various font styles are not fixed yet (e.g. because
an \atop comes later that shifts the font style), and a resolved form,
where the fonts have been determined and are fixed.
The parameter S:MathFontStyleT makes the distinction between the two forms.
For S=MathFontStyle (the resolved form), this implements NodeTrait.
Variants§
Atom(MathAtom<ET, S>)
A math atom node (see MathAtom)
Penalty(i32)
A penalty node, as produced by \penalty.
Mark(usize, TokenList<ET::Token>)
A mark node, as produced by \mark.
Whatsit(WhatsitNode<ET>)
A whatsit node, as produced by \special, \write, etc.
HSkip(Skip<ET::Dim>)
A glue node, as produced by \hskip.
MSkip
A glue node, as produced by \mskip. If resolved, S provides the adequate em value.
HFil
A glue node, as produced by \hfil.
HFill
A glue node, as produced by \hfill.
HFilneg
A glue node, as produced by \hfilneg.
Hss
A glue node, as produced by \hss.
Space
A glue node, as produced by \
HKern(ET::Dim)
A kern node, as produced by \kern.
MKern
A kern node, as produced by \mkern.
Leaders(Leaders<ET>)
A leaders node, as produced by \leaders or \cleaders or \xleaders.
VRule
A rule node, as produced by \vrule.
Fields
Over
A “generalized fraction”, as produced by \over, \atop, \above,
\abovewithdelims, \overwithdelims, \atopwithdelims.
Fields
Choice(S::Choice)
A \mathchoice node; if resolved, this is just a wrapper around more math nodes.
Marker(S::Markers)
Markers for the various font styles, e.g. \displaystyle, \textstyle, etc.
Custom(ET::CustomNode)
A custom node.
Implementations§
Source§impl<ET: EngineTypes> MathNode<ET, UnresolvedMathFontStyle<ET>>
impl<ET: EngineTypes> MathNode<ET, UnresolvedMathFontStyle<ET>>
Trait Implementations§
Source§impl<ET: Clone + EngineTypes, S: Clone + MathFontStyleT<ET>> Clone for MathNode<ET, S>
impl<ET: Clone + EngineTypes, S: Clone + MathFontStyleT<ET>> Clone for MathNode<ET, S>
Source§impl<ET: Debug + EngineTypes, S: Debug + MathFontStyleT<ET>> Debug for MathNode<ET, S>
impl<ET: Debug + EngineTypes, S: Debug + MathFontStyleT<ET>> Debug for MathNode<ET, S>
Source§impl<ET: EngineTypes> NodeTrait<ET> for MathNode<ET, MathFontStyle<ET>>
impl<ET: EngineTypes> NodeTrait<ET> for MathNode<ET, MathFontStyle<ET>>
Source§fn display_fmt(&self, indent: usize, f: &mut Formatter<'_>) -> Result
fn display_fmt(&self, indent: usize, f: &mut Formatter<'_>) -> Result
indent value to indent the stringSource§fn opaque(&self) -> bool
fn opaque(&self) -> bool
\unskip
or \lastbox, this node should not be considered. Useful for annotation/marker nodes
some engine wants to insert, without impacting algorithms that inspect e.g. the last node
of the current list.Source§fn display(&self) -> DisplayNode<'_, ET, Self>
fn display(&self) -> DisplayNode<'_, ET, Self>
Display and uses Self::display_fmt
to yield a human-readable string.fn sourceref(&self) -> Option<(&SourceRef<ET>, &SourceRef<ET>)>
Auto Trait Implementations§
impl<ET, S> !Freeze for MathNode<ET, S>
impl<ET, S> !RefUnwindSafe for MathNode<ET, S>
impl<ET, S> Send for MathNode<ET, S>where
S: Send,
<ET as EngineTypes>::Dim: Send,
<ET as EngineTypes>::MuDim: Send,
<S as MathFontStyleT<ET>>::Choice: Send,
<S as MathFontStyleT<ET>>::Markers: Send,
<ET as EngineTypes>::CustomNode: Send,
<<ET as EngineTypes>::File as File>::SourceRefID: Send,
<ET as EngineTypes>::Char: Send,
<ET as EngineTypes>::Font: Send,
ET: Send,
impl<ET, S> !Sync for MathNode<ET, S>
impl<ET, S> Unpin for MathNode<ET, S>where
S: Unpin,
<ET as EngineTypes>::Dim: Unpin,
<ET as EngineTypes>::MuDim: Unpin,
<S as MathFontStyleT<ET>>::Choice: Unpin,
<S as MathFontStyleT<ET>>::Markers: Unpin,
<ET as EngineTypes>::CustomNode: Unpin,
<<ET as EngineTypes>::File as File>::SourceRefID: Unpin,
<ET as EngineTypes>::Char: Unpin,
<ET as EngineTypes>::Token: Unpin,
impl<ET, S> UnsafeUnpin for MathNode<ET, S>where
S: UnsafeUnpin,
<ET as EngineTypes>::Dim: UnsafeUnpin,
<ET as EngineTypes>::MuDim: UnsafeUnpin,
<S as MathFontStyleT<ET>>::Choice: UnsafeUnpin,
<S as MathFontStyleT<ET>>::Markers: UnsafeUnpin,
<ET as EngineTypes>::CustomNode: UnsafeUnpin,
<<ET as EngineTypes>::File as File>::SourceRefID: UnsafeUnpin,
<ET as EngineTypes>::Char: UnsafeUnpin,
impl<ET, S> UnwindSafe for MathNode<ET, S>where
S: UnwindSafe,
<ET as EngineTypes>::Dim: UnwindSafe,
<ET as EngineTypes>::MuDim: UnwindSafe,
<S as MathFontStyleT<ET>>::Choice: UnwindSafe,
<S as MathFontStyleT<ET>>::Markers: UnwindSafe,
<ET as EngineTypes>::CustomNode: UnwindSafe,
<<ET as EngineTypes>::File as File>::SourceRefID: UnwindSafe,
<ET as EngineTypes>::Char: UnwindSafe,
<ET as EngineTypes>::Token: UnwindSafe,
<ET as EngineTypes>::Font: UnwindSafe,
ET: UnwindSafe,
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more