Skip to main content

NodeData

Enum NodeData 

Source
pub enum NodeData {
Show 27 variants Temp, Box(Box<BoxData>), Rule { width: i32, depth: i32, height: i32, dir: i8, index: i32, left: i32, right: i32, }, Ins { cost: i32, depth: i32, height: i32, spec: Glue, head: NodeRef, }, Mark { class: u32, mark: TokenList, }, Adjust { head: NodeRef, }, Boundary { value: i32, }, Disc { pre: NodeRef, post: NodeRef, replace: NodeRef, penalty: i32, }, Whatsit(Box<Whatsit>), LocalPar { pen_inter: i32, pen_broken: i32, dir: i8, box_left: NodeRef, box_left_width: i32, box_right: NodeRef, box_right_width: i32, }, Dir { dir: i8, level: i32, }, Math { surround: i32, glue: Glue, }, Glue { spec: Glue, leader: NodeRef, }, Kern { kern: i32, expansion_factor: i32, }, Penalty { penalty: i32, }, Unset { b: Box<BoxData>, span_count: u16, stretch: i32, shrink: i32, stretch_order: u8, shrink_order: u8, }, Glyph(GlyphData), MarginKern { width: i32, glyph: NodeRef, }, Noad(Box<NoadData>), Fraction(Box<FractionData>), Fence(Box<FenceData>), Style { style: u8, }, Choice(Box<[NodeRef; 4]>), MathChar { fam: u32, chr: u32, }, SubList { head: NodeRef, }, Delim { small_fam: u32, small_char: u32, large_fam: u32, large_char: u32, }, Other(Vec<i64>),
}
Expand description

Type-specific node data.

Variants§

§

Temp

A list head or other temporary node.

§

Box(Box<BoxData>)

An hlist or vlist (id tells which).

§

Rule

A rule.

Fields

§width: i32

Width (or “running”).

§depth: i32

Depth.

§height: i32

Height.

§dir: i8

Direction.

§index: i32

Resource index (box/image rules).

§left: i32

Left offset.

§right: i32

Right offset.

§

Ins

An insertion.

Fields

§cost: i32

\floatingpenalty.

§depth: i32

Depth.

§height: i32

Natural height plus depth.

§spec: Glue

\splittopskip.

§head: NodeRef

The vertical list.

§

Mark

A mark.

Fields

§class: u32

The marks class.

§mark: TokenList

The token list.

§

Adjust

A \vadjust.

Fields

§head: NodeRef

The vertical list.

§

Boundary

A boundary.

Fields

§value: i32

The value.

§

Disc

A discretionary.

Fields

§pre: NodeRef

Pre-break list.

§post: NodeRef

Post-break list.

§replace: NodeRef

Replacement list.

§penalty: i32

Penalty.

§

Whatsit(Box<Whatsit>)

A whatsit.

§

LocalPar

A local paragraph node.

Fields

§pen_inter: i32

\localinterlinepenalty.

§pen_broken: i32

\localbrokenpenalty.

§dir: i8

Paragraph direction.

§box_left: NodeRef

\localleftbox.

§box_left_width: i32

Its width.

§box_right: NodeRef

\localrightbox.

§box_right_width: i32

Its width.

§

Dir

A direction change.

Fields

§dir: i8

The direction.

§level: i32

The group level.

§

Math

Math on/off.

Fields

§surround: i32

\mathsurround.

§glue: Glue

\mathsurroundskip as glue.

§

Glue

Glue.

Fields

§spec: Glue

The specification.

§leader: NodeRef

Leader box or rule.

§

Kern

A kern.

Fields

§kern: i32

The amount.

§expansion_factor: i32

Font expansion factor.

§

Penalty

A penalty.

Fields

§penalty: i32

The penalty.

§

Unset

An unset box in an alignment.

Fields

§b: Box<BoxData>

Box fields (glue_set unused).

§span_count: u16

Number of spanned columns minus one.

§stretch: i32

Total stretch.

§shrink: i32

Total shrink.

§stretch_order: u8

Stretch order.

§shrink_order: u8

Shrink order.

§

Glyph(GlyphData)

A glyph (stored inline: glyphs are the most frequent nodes).

§

MarginKern

A margin kern.

Fields

§width: i32

Width.

§glyph: NodeRef

The glyph it belongs to.

§

Noad(Box<NoadData>)

A noad (noad, radical and accent ids).

§

Fraction(Box<FractionData>)

A generalized fraction noad.

§

Fence(Box<FenceData>)

A \left, \middle or \right noad.

§

Style

A style node (\displaystyle …); the style is 0–7 as in TeX.

Fields

§style: u8

The style.

§

Choice(Box<[NodeRef; 4]>)

A \mathchoice node: display, text, script and scriptscript lists.

§

MathChar

A math_char or math_text_char kernel.

Fields

§fam: u32

The family.

§chr: u32

The character.

§

SubList

A sub_box or sub_mlist kernel.

Fields

§head: NodeRef

The box (sub_box) or the mlist (sub_mlist).

§

Delim

A delimiter specification (delim node).

Fields

§small_fam: u32

Family of the small variant.

§small_char: u32

Character of the small variant.

§large_fam: u32

Family of the large variant.

§large_char: u32

Character of the large variant.

§

Other(Vec<i64>)

Nodes not modelled in detail.

Trait Implementations§

Source§

impl Clone for NodeData

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for NodeData

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl PartialEq for NodeData

Source§

fn eq(&self, other: &Self) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for NodeData

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> ErasedDestructor for T
where T: 'static,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.