pub struct RusTeXState(/* private fields */);Implementations§
Source§impl RusTeXState
impl RusTeXState
pub fn destruct(self) -> CSNameVec<u8, TeXCommand<Types>>
pub fn set_command_direct( &mut self, name: InternedCSName<u8>, cmd: Option<TeXCommand<Types>>, )
Trait Implementations§
Source§impl Clone for RusTeXState
impl Clone for RusTeXState
Source§fn clone(&self) -> RusTeXState
fn clone(&self) -> RusTeXState
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl State<Types> for RusTeXState
impl State<Types> for RusTeXState
Source§fn new(
nullfont: TfmFont<i32, Dim32, InternedCSName<u8>>,
aux: &mut EngineAux<Types>,
) -> Self
fn new( nullfont: TfmFont<i32, Dim32, InternedCSName<u8>>, aux: &mut EngineAux<Types>, ) -> Self
Instantiate a new
StateSource§fn register_primitive(
&mut self,
aux: &mut EngineAux<Types>,
name: &'static str,
cmd: PrimitiveCommand<Types>,
)
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>
fn primitives(&self) -> &PrimitiveCommands<Types>
return the set of all registered
PrimitiveCommands.Source§fn aftergroup(&mut self, token: CompactToken)
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,
)
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 \tracinggroupsSource§fn pop(
&mut self,
aux: &mut EngineAux<Types>,
mouth: &mut <Types as EngineTypes>::Mouth,
)
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>
fn get_group_type(&self) -> Option<GroupType>
The current [
GroupType] (i.e. \currentgrouptype`).Source§fn get_group_level(&self) -> usize
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>>
fn get_current_font(&self) -> &TfmFont<i32, Dim32, InternedCSName<u8>>
Get the current
FontSource§fn get_textfont(&self, i: u8) -> &<Types as EngineTypes>::Font
fn get_textfont(&self, i: u8) -> &<Types as EngineTypes>::Font
Get the current
\textfont for the given family number, where fam is 0..15Source§fn set_textfont(
&mut self,
aux: &mut EngineAux<Types>,
idx: u8,
fnt: <Types as EngineTypes>::Font,
globally: bool,
)
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..15Source§fn get_scriptfont(&self, i: u8) -> &<Types as EngineTypes>::Font
fn get_scriptfont(&self, i: u8) -> &<Types as EngineTypes>::Font
Get the current
\scriptfont for the given family number, where fam is 0..15Source§fn set_scriptfont(
&mut self,
aux: &mut EngineAux<Types>,
idx: u8,
fnt: <Types as EngineTypes>::Font,
globally: bool,
)
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..15Source§fn get_scriptscriptfont(&self, i: u8) -> &<Types as EngineTypes>::Font
fn get_scriptscriptfont(&self, i: u8) -> &<Types as EngineTypes>::Font
Get the current
\scriptscriptfont for the given family number, where fam is 0..15Source§fn set_scriptscriptfont(
&mut self,
aux: &mut EngineAux<Types>,
idx: u8,
fnt: <Types as EngineTypes>::Font,
globally: bool,
)
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..15Source§fn set_current_font(
&mut self,
aux: &mut EngineAux<Types>,
fnt: TfmFont<i32, Dim32, InternedCSName<u8>>,
globally: bool,
)
fn set_current_font( &mut self, aux: &mut EngineAux<Types>, fnt: TfmFont<i32, Dim32, InternedCSName<u8>>, globally: bool, )
Set the current
FontSource§fn get_catcode_scheme(&self) -> &CategoryCodeScheme<u8>
fn get_catcode_scheme(&self) -> &CategoryCodeScheme<u8>
Get the current
CategoryCodeSchemeSource§fn set_catcode(
&mut self,
aux: &EngineAux<Types>,
c: u8,
cc: CategoryCode,
globally: bool,
)
fn set_catcode( &mut self, aux: &EngineAux<Types>, c: u8, cc: CategoryCode, globally: bool, )
Set the current
CategoryCode for a characterSource§fn get_sfcode(&self, c: u8) -> u16
fn get_sfcode(&self, c: u8) -> u16
Get the current space factor code
\sfcode for a characterSource§fn set_sfcode(
&mut self,
aux: &EngineAux<Types>,
c: u8,
sfcode: u16,
globally: bool,
)
fn set_sfcode( &mut self, aux: &EngineAux<Types>, c: u8, sfcode: u16, globally: bool, )
Set the current space factor code
\sfcode for a characterSource§fn get_lccode(&self, c: u8) -> u8
fn get_lccode(&self, c: u8) -> u8
Get the current lower case code
\lccode for a characterSource§fn set_lccode(
&mut self,
aux: &EngineAux<Types>,
c: u8,
lccode: u8,
globally: bool,
)
fn set_lccode( &mut self, aux: &EngineAux<Types>, c: u8, lccode: u8, globally: bool, )
Set the current lower case code
\lccode for a characterSource§fn get_uccode(&self, c: u8) -> u8
fn get_uccode(&self, c: u8) -> u8
Get the current upper case code
\uccode for a characterSource§fn set_uccode(
&mut self,
aux: &EngineAux<Types>,
c: u8,
uccode: u8,
globally: bool,
)
fn set_uccode( &mut self, aux: &EngineAux<Types>, c: u8, uccode: u8, globally: bool, )
Set the current upper case code
\uccode for a characterSource§fn get_delcode(&self, c: u8) -> i32
fn get_delcode(&self, c: u8) -> i32
Get the current delimiter code
\delcode for a characterSource§fn set_delcode(
&mut self,
aux: &EngineAux<Types>,
c: u8,
delcode: i32,
globally: bool,
)
fn set_delcode( &mut self, aux: &EngineAux<Types>, c: u8, delcode: i32, globally: bool, )
Set the current delimiter code
\delcode for a characterSource§fn get_mathcode(&self, c: u8) -> u32
fn get_mathcode(&self, c: u8) -> u32
Get the current math code
\mathcode for a characterSource§fn set_mathcode(
&mut self,
aux: &EngineAux<Types>,
c: u8,
mathcode: u32,
globally: bool,
)
fn set_mathcode( &mut self, aux: &EngineAux<Types>, c: u8, mathcode: u32, globally: bool, )
Set the current math code
\mathcode for a characterSource§fn get_endline_char(&self) -> Option<u8>
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,
)
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>
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,
)
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>
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,
)
fn set_newline_char( &mut self, aux: &EngineAux<Types>, c: Option<u8>, globally: bool, )
Set the current newline character
Source§fn take_parshape(&mut self) -> Vec<(Dim32, Dim32)>
fn take_parshape(&mut self) -> Vec<(Dim32, Dim32)>
Get the current
\parshape and set it to its default valueSource§fn set_parshape(
&mut self,
aux: &EngineAux<Types>,
parshape: Vec<(Dim32, Dim32)>,
globally: bool,
)
fn set_parshape( &mut self, aux: &EngineAux<Types>, parshape: Vec<(Dim32, Dim32)>, globally: bool, )
Set the current
\parshapeSource§fn get_int_register(&self, idx: usize) -> i32
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,
)
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
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,
)
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
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,
)
fn set_dim_register( &mut self, aux: &EngineAux<Types>, idx: usize, v: Dim32, globally: bool, )
Set a dimen register value
Source§fn set_skip_register(
&mut self,
aux: &EngineAux<Types>,
idx: usize,
v: Skip<Dim32>,
globally: bool,
)
fn set_skip_register( &mut self, aux: &EngineAux<Types>, idx: usize, v: Skip<Dim32>, globally: bool, )
Set a skip register value
Source§fn set_muskip_register(
&mut self,
aux: &EngineAux<Types>,
idx: usize,
v: MuSkip<Mu>,
globally: bool,
)
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>
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,
)
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_mut(&mut self, idx: usize) -> Option<&mut TeXBox<Types>>
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>>
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,
)
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
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,
)
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>
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,
)
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>
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,
)
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>
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,
)
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>>
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,
)
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>>
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,
)
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>
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)
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..15Source§impl StateChangeTracker<Types> for RusTeXState
impl StateChangeTracker<Types> for RusTeXState
Source§fn stack(&mut self) -> &mut StateStack<Types>
fn stack(&mut self) -> &mut StateStack<Types>
Get the current
StateStackSource§fn change_field<F>(&mut self, globally: bool, f: F)
fn change_field<F>(&mut self, globally: bool, f: F)
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 moreAuto Trait Implementations§
impl Freeze for RusTeXState
impl !RefUnwindSafe for RusTeXState
impl Send for RusTeXState
impl !Sync for RusTeXState
impl Unpin for RusTeXState
impl UnsafeUnpin for RusTeXState
impl UnwindSafe for RusTeXState
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