pub enum TeXBox<ET: EngineTypes> {
V {
info: VBoxInfo<ET>,
children: Box<[VNode<ET>]>,
start: SourceRef<ET>,
end: SourceRef<ET>,
},
H {
info: HBoxInfo<ET>,
children: Box<[HNode<ET>]>,
start: SourceRef<ET>,
end: SourceRef<ET>,
preskip: Option<Skip<ET::Dim>>,
},
}Expand description
A box, i.e. the result of e.g. \hbox, \vbox, \vtop,
a line of a paragraph, a row/cell in an \halign…
Variants§
Implementations§
Source§impl<ET: EngineTypes> TeXBox<ET>
impl<ET: EngineTypes> TeXBox<ET>
pub fn to_math(self) -> MathNode<ET, UnresolvedMathFontStyle<ET>>
Sourcepub fn assign_height(&mut self, h: ET::Dim)
pub fn assign_height(&mut self, h: ET::Dim)
Assigns the given height to this box (as e.g. \ht0=50pt)
Sourcepub fn assigned_height(&self) -> Option<ET::Dim>
pub fn assigned_height(&self) -> Option<ET::Dim>
The assigned height of this box, if any (i.e. the result of \ht0=...)
Sourcepub fn assign_width(&mut self, w: ET::Dim)
pub fn assign_width(&mut self, w: ET::Dim)
Assigns the given width to this box (as e.g. \wd0=50pt)
Sourcepub fn assigned_width(&self) -> Option<ET::Dim>
pub fn assigned_width(&self) -> Option<ET::Dim>
The assigned width of this box, if any (i.e. the result of \wd0=...)
Sourcepub fn assign_depth(&mut self, d: ET::Dim)
pub fn assign_depth(&mut self, d: ET::Dim)
Assigns the given depth to this box (as e.g. \dp0=50pt)
Sourcepub fn assigned_depth(&self) -> Option<ET::Dim>
pub fn assigned_depth(&self) -> Option<ET::Dim>
The assigned depth of this box, if any (i.e. the result of \dp0=...)
Sourcepub fn to_or_scaled(&self) -> ToOrSpread<ET::Dim>
pub fn to_or_scaled(&self) -> ToOrSpread<ET::Dim>
The “scaling factor” of this box, i.e. the to or spread in e.g. \hbox to 50pt or \hbox spread 10pt
Trait Implementations§
Source§impl<ET: EngineTypes> NodeTrait<ET> for TeXBox<ET>
impl<ET: EngineTypes> NodeTrait<ET> for TeXBox<ET>
Source§fn display_fmt(&self, indent: usize, f: &mut Formatter<'_>) -> Result
fn display_fmt(&self, indent: usize, f: &mut Formatter<'_>) -> Result
Produces a human-readable string; since nodes are deeply nested, takes an
additional
indent value to indent the stringfn sourceref(&self) -> Option<(&SourceRef<ET>, &SourceRef<ET>)>
Source§fn display(&self) -> DisplayNode<'_, ET, Self>
fn display(&self) -> DisplayNode<'_, ET, Self>
Returns a helper struct that implements
Display and uses Self::display_fmt
to yield a human-readable string.Source§fn opaque(&self) -> bool
fn opaque(&self) -> bool
Whether this node is “opaque”; meaning: When considering a list of nodes (e.g. in
\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.Auto Trait Implementations§
impl<ET> !Freeze for TeXBox<ET>
impl<ET> !RefUnwindSafe for TeXBox<ET>
impl<ET> Send for TeXBox<ET>where
<<ET as EngineTypes>::File as File>::SourceRefID: Send,
<ET as EngineTypes>::Dim: Send,
<ET as EngineTypes>::CustomNode: Send,
<ET as EngineTypes>::Char: Send,
<ET as EngineTypes>::Font: Send,
<ET as EngineTypes>::MuDim: Send,
ET: Send,
impl<ET> !Sync for TeXBox<ET>
impl<ET> Unpin for TeXBox<ET>
impl<ET> UnsafeUnpin for TeXBox<ET>where
<<ET as EngineTypes>::File as File>::SourceRefID: UnsafeUnpin,
<ET as EngineTypes>::Dim: UnsafeUnpin,
impl<ET> UnwindSafe for TeXBox<ET>where
<<ET as EngineTypes>::File as File>::SourceRefID: UnwindSafe,
<ET as EngineTypes>::Dim: UnwindSafe,
<ET as EngineTypes>::CustomNode: UnwindSafe,
<ET as EngineTypes>::Char: UnwindSafe,
<ET as EngineTypes>::Font: UnwindSafe,
<ET as EngineTypes>::Token: UnwindSafe,
<ET as EngineTypes>::MuDim: 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
Mutably borrows from an owned value. Read more
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>
Converts
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>
Converts
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