Skip to main content

RusTeXState

Struct RusTeXState 

Source
pub struct RusTeXState(/* private fields */);

Implementations§

Trait Implementations§

Source§

impl Clone for RusTeXState

Source§

fn clone(&self) -> RusTeXState

Returns a duplicate of the value. Read more
1.0.0 · Source§

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

Performs copy-assignment from source. Read more
Source§

impl State<Types> for RusTeXState

Source§

fn new( nullfont: TfmFont<i32, Dim32, InternedCSName<u8>>, aux: &mut EngineAux<Types>, ) -> Self

Instantiate a new State
Source§

fn register_primitive( &mut self, aux: &mut EngineAux<Types>, name: &'static str, cmd: PrimitiveCommand<Types>, )

register a new PrimitiveCommand. Should only be called during engine initialization.
Source§

fn primitives(&self) -> &PrimitiveCommands<Types>

return the set of all registered PrimitiveCommands.
Source§

fn aftergroup(&mut self, token: CompactToken)

Append a Token to be inserted when the current group ends (i.e. \aftergroup)
Source§

fn push( &mut self, aux: &mut EngineAux<Types>, group_type: GroupType, line_number: usize, )

push a new group level to the scoping stack; line_number is used for \tracinggroups
Source§

fn pop( &mut self, aux: &mut EngineAux<Types>, mouth: &mut <Types as EngineTypes>::Mouth, )

pop a group level from the scoping stack. Needs the mouth to insert the \aftergroup Tokens (if set)
Source§

fn get_group_type(&self) -> Option<GroupType>

The current [GroupType] (i.e. \currentgrouptype`).
Source§

fn get_group_level(&self) -> usize

The current group level/depth (0 being the top level; i.e. \currentgrouplevel)
Source§

fn get_current_font(&self) -> &TfmFont<i32, Dim32, InternedCSName<u8>>

Get the current Font
Source§

fn get_textfont(&self, i: u8) -> &<Types as EngineTypes>::Font

Get the current \textfont for the given family number, where fam is 0..15
Source§

fn set_textfont( &mut self, aux: &mut EngineAux<Types>, idx: u8, fnt: <Types as EngineTypes>::Font, globally: bool, )

Set the current \textfont for the given family number, where fam is 0..15
Source§

fn get_scriptfont(&self, i: u8) -> &<Types as EngineTypes>::Font

Get the current \scriptfont for the given family number, where fam is 0..15
Source§

fn set_scriptfont( &mut self, aux: &mut EngineAux<Types>, idx: u8, fnt: <Types as EngineTypes>::Font, globally: bool, )

Set the current \scriptfont for the given family number, where fam is 0..15
Source§

fn get_scriptscriptfont(&self, i: u8) -> &<Types as EngineTypes>::Font

Get the current \scriptscriptfont for the given family number, where fam is 0..15
Source§

fn set_scriptscriptfont( &mut self, aux: &mut EngineAux<Types>, idx: u8, fnt: <Types as EngineTypes>::Font, globally: bool, )

Set the current \scriptscriptfont for the given family number, where fam is 0..15
Source§

fn set_current_font( &mut self, aux: &mut EngineAux<Types>, fnt: TfmFont<i32, Dim32, InternedCSName<u8>>, globally: bool, )

Set the current Font
Source§

fn get_catcode_scheme(&self) -> &CategoryCodeScheme<u8>

Get the current CategoryCodeScheme
Source§

fn set_catcode( &mut self, aux: &EngineAux<Types>, c: u8, cc: CategoryCode, globally: bool, )

Set the current CategoryCode for a character
Source§

fn get_sfcode(&self, c: u8) -> u16

Get the current space factor code \sfcode for a character
Source§

fn set_sfcode( &mut self, aux: &EngineAux<Types>, c: u8, sfcode: u16, globally: bool, )

Set the current space factor code \sfcode for a character
Source§

fn get_lccode(&self, c: u8) -> u8

Get the current lower case code \lccode for a character
Source§

fn set_lccode( &mut self, aux: &EngineAux<Types>, c: u8, lccode: u8, globally: bool, )

Set the current lower case code \lccode for a character
Source§

fn get_uccode(&self, c: u8) -> u8

Get the current upper case code \uccode for a character
Source§

fn set_uccode( &mut self, aux: &EngineAux<Types>, c: u8, uccode: u8, globally: bool, )

Set the current upper case code \uccode for a character
Source§

fn get_delcode(&self, c: u8) -> i32

Get the current delimiter code \delcode for a character
Source§

fn set_delcode( &mut self, aux: &EngineAux<Types>, c: u8, delcode: i32, globally: bool, )

Set the current delimiter code \delcode for a character
Source§

fn get_mathcode(&self, c: u8) -> u32

Get the current math code \mathcode for a character
Source§

fn set_mathcode( &mut self, aux: &EngineAux<Types>, c: u8, mathcode: u32, globally: bool, )

Set the current math code \mathcode for a character
Source§

fn get_endline_char(&self) -> Option<u8>

Get the current endline character
Source§

fn set_endline_char( &mut self, aux: &EngineAux<Types>, c: Option<u8>, globally: bool, )

Set the current endline character
Source§

fn get_escape_char(&self) -> Option<u8>

Get the current escape character
Source§

fn set_escape_char( &mut self, aux: &EngineAux<Types>, c: Option<u8>, globally: bool, )

Set the current escape character
Source§

fn get_newline_char(&self) -> Option<u8>

Get the current newline character
Source§

fn set_newline_char( &mut self, aux: &EngineAux<Types>, c: Option<u8>, globally: bool, )

Set the current newline character
Source§

fn get_parshape(&self) -> &Vec<(Dim32, Dim32)>

Get the current \parshape
Source§

fn take_parshape(&mut self) -> Vec<(Dim32, Dim32)>

Get the current \parshape and set it to its default value
Source§

fn set_parshape( &mut self, aux: &EngineAux<Types>, parshape: Vec<(Dim32, Dim32)>, globally: bool, )

Set the current \parshape
Source§

fn get_int_register(&self, idx: usize) -> i32

Get an integer register value
Source§

fn set_int_register( &mut self, aux: &EngineAux<Types>, idx: usize, v: i32, globally: bool, )

Set an integer register value
Source§

fn get_primitive_int(&self, name: PrimitiveIdentifier) -> i32

Get a primitive integer value
Source§

fn set_primitive_int( &mut self, aux: &EngineAux<Types>, name: PrimitiveIdentifier, v: i32, globally: bool, )

Set a primitive integer value
Source§

fn get_dim_register(&self, idx: usize) -> Dim32

Get a dimen register value
Source§

fn set_dim_register( &mut self, aux: &EngineAux<Types>, idx: usize, v: Dim32, globally: bool, )

Set a dimen register value
Source§

fn get_skip_register(&self, idx: usize) -> Skip<Dim32>

Get a skip register value
Source§

fn set_skip_register( &mut self, aux: &EngineAux<Types>, idx: usize, v: Skip<Dim32>, globally: bool, )

Set a skip register value
Source§

fn get_muskip_register(&self, idx: usize) -> MuSkip<Mu>

Get a muskip register value
Source§

fn set_muskip_register( &mut self, aux: &EngineAux<Types>, idx: usize, v: MuSkip<Mu>, globally: bool, )

Set a muskip register value
Source§

fn get_toks_register(&self, idx: usize) -> &TokenList<CompactToken>

Get a token register value
Source§

fn set_toks_register( &mut self, aux: &EngineAux<Types>, idx: usize, v: TokenList<CompactToken>, globally: bool, )

Set a token register value
Source§

fn get_box_register(&self, idx: usize) -> Option<&TeXBox<Types>>

Get a box register value
Source§

fn get_box_register_mut(&mut self, idx: usize) -> Option<&mut TeXBox<Types>>

Get a box register value mutably (to e.g. change \ht, \wd, \dp, etc.)
Source§

fn take_box_register(&mut self, idx: usize) -> Option<TeXBox<Types>>

Take a box register value; replacing it with None (i.e. void box)
Source§

fn set_box_register( &mut self, aux: &EngineAux<Types>, idx: usize, v: Option<TeXBox<Types>>, globally: bool, )

Set a box register value
Source§

fn get_primitive_dim(&self, name: PrimitiveIdentifier) -> Dim32

Get a primitive dimension value
Source§

fn set_primitive_dim( &mut self, aux: &EngineAux<Types>, name: PrimitiveIdentifier, v: Dim32, globally: bool, )

Set a primitive dimension value
Source§

fn get_primitive_skip(&self, name: PrimitiveIdentifier) -> Skip<Dim32>

Get a primitive skip value
Source§

fn set_primitive_skip( &mut self, aux: &EngineAux<Types>, name: PrimitiveIdentifier, v: Skip<Dim32>, globally: bool, )

Set a primitive skip value
Source§

fn get_primitive_muskip(&self, name: PrimitiveIdentifier) -> MuSkip<Mu>

Get a primitive muskip value
Source§

fn set_primitive_muskip( &mut self, aux: &EngineAux<Types>, name: PrimitiveIdentifier, v: MuSkip<Mu>, globally: bool, )

Set a primitive muskip value
Source§

fn get_primitive_tokens( &self, name: PrimitiveIdentifier, ) -> &TokenList<CompactToken>

Get a primitive token list
Source§

fn set_primitive_tokens( &mut self, aux: &EngineAux<Types>, name: PrimitiveIdentifier, v: TokenList<CompactToken>, globally: bool, )

Set a primitive token list
Source§

fn get_command(&self, name: &InternedCSName<u8>) -> Option<&TeXCommand<Types>>

Get the current definition for the control sequence name
Source§

fn set_command( &mut self, aux: &EngineAux<Types>, name: InternedCSName<u8>, cmd: Option<TeXCommand<Types>>, globally: bool, )

Set the current definition for the control sequence name
Source§

fn get_ac_command(&self, c: u8) -> Option<&TeXCommand<Types>>

Get the current definition for the active character
Source§

fn set_ac_command( &mut self, aux: &EngineAux<Types>, c: u8, cmd: Option<TeXCommand<Types>>, globally: bool, )

Set the current definition for the active character
Source§

fn register_index(i: <ET as EngineTypes>::Int) -> Option<usize>

convert the provided integer value into a legal index for a register (or None if out of range)
Source§

fn get_mathfonts( &self, fam: u8, ) -> (<ET as EngineTypes>::Font, <ET as EngineTypes>::Font, <ET as EngineTypes>::Font)

Get the current set of mathfonts (text, script, scriptscript) for the given family number, where fam is 0..15
Source§

impl StateChangeTracker<Types> for RusTeXState

Source§

fn stack(&mut self) -> &mut StateStack<Types>

Get the current StateStack
Source§

fn change_field<F>(&mut self, globally: bool, f: F)
where F: FnOnce(&mut Self, bool) -> StateChange<ET>,

Change a field of the state, and add the change to the StateStack. Also takes care of inspecting and considering the current \globaldefs value and passes on the actual computed globally value to the continuation function, which should return the StateChange containg the old value. 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> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
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> IntoEither for T

Source§

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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

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
Source§

impl<ET, Err, A> IntoErr<ET, Err> for A
where ET: EngineTypes, Err: From<A>,

Source§

fn into_err( self, _aux: &EngineAux<ET>, _state: &<ET as EngineTypes>::State, ) -> Err

§

impl<T> Pointable for T

§

const ALIGN: usize

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
§

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

§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns [Action::Follow] only if self and other return Action::Follow. Read more
§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns [Action::Follow] if either self or other returns Action::Follow. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
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 = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

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.
§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more