Skip to main content

PageState

Struct PageState 

Source
pub struct PageState {
Show 18 fields pub contrib_head: NodeRef, pub page_head: NodeRef, pub page_tail: NodeRef, pub so_far: [i32; 8], pub fi_stretch: i32, pub max_depth: i32, pub contents: PageContents, pub best_break: NodeRef, pub least_cost: i32, pub best_size: i32, pub best_so_far: [i32; 8], pub best_infinite: bool, pub last_break: Option<PageBreakInfo>, pub ins: Vec<PageIns>, pub last_glue: Option<Glue>, pub last_penalty: i32, pub last_kern: i32, pub last_node_type: i32,
}
Expand description

The state of the page builder (§980–§982).

Fields§

§contrib_head: NodeRef

Head of the contribution list.

§page_head: NodeRef

Head of the current page.

§page_tail: NodeRef

Tail of the current page.

§so_far: [i32; 8]

page_so_far: goal, total, stretch (normal, fil, fill, filll), shrink, depth. The fi stretch is in PageState::fi_stretch.

§fi_stretch: i32

Page stretch of order fi (LuaTeX).

§max_depth: i32

page_max_depth.

§contents: PageContents

What the page contains.

§best_break: NodeRef

The best break found so far (best_page_break).

§least_cost: i32

Its cost (least_page_cost).

§best_size: i32

The page goal at the best break (best_size).

§best_so_far: [i32; 8]

so_far at the best break (for crate::pagenote).

§best_infinite: bool

Whether the page had infinite stretch at the best break.

§last_break: Option<PageBreakInfo>

What the last page break left out (default output mode).

§ins: Vec<PageIns>

Insertion classes on the page, in increasing class order.

§last_glue: Option<Glue>

\lastskip etc. of the page (last_glue); None if the last item was not glue.

§last_penalty: i32

last_penalty.

§last_kern: i32

last_kern.

§last_node_type: i32

\lastnodetype of the page.

Implementations§

Source§

impl PageState

Source

pub fn init(&mut self, nodes: &mut Nodes)

Allocates the list heads.

Source

pub fn stretch(&self, o: u8) -> i32

The page stretch of glue order o (LuaTeX numbering).

Source

pub fn stretch_mut(&mut self, o: u8) -> &mut i32

Mutable access to the page stretch of order o.

Trait Implementations§

Source§

impl Clone for PageState

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 PageState

Source§

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

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

impl Default for PageState

Source§

fn default() -> Self

Returns the “default value” for a type. Read more

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.