pub struct State { /* private fields */ }
Expand description
Simple state type for use in unit tests.
If the primitives under test don’t require custom components or other pieces in the state, it is easier to use this type rather than defining a custom one.
Implementations§
Trait Implementations§
Source§impl HasComponent<Component> for State
impl HasComponent<Component> for State
Source§impl HasComponent<Component> for State
impl HasComponent<Component> for State
Source§impl TexlangState for State
impl TexlangState for State
Source§fn post_macro_expansion_hook(
token: Token,
input: &ExpansionInput<Self>,
tex_macro: &Macro,
arguments: &[&[Token]],
reversed_expansion: &[Token],
)
fn post_macro_expansion_hook( token: Token, input: &ExpansionInput<Self>, tex_macro: &Macro, arguments: &[&[Token]], reversed_expansion: &[Token], )
Hook that is invoked after a TeX macro is expanded. Read more
Source§fn expansion_override_hook(
token: Token,
input: &mut ExpansionInput<Self>,
tag: Option<Tag>,
) -> Result<Option<Token>, Box<Error>>
fn expansion_override_hook( token: Token, input: &mut ExpansionInput<Self>, tag: Option<Tag>, ) -> Result<Option<Token>, Box<Error>>
Hook that potentially overrides the expansion of a command. Read more
Source§fn pre_source_code_addition_hook(
token: Option<Token>,
num_existing_sources: usize,
) -> Result<(), Box<Error>>
fn pre_source_code_addition_hook( token: Option<Token>, num_existing_sources: usize, ) -> Result<(), Box<Error>>
Hook that runs before new source code is added. Read more
Source§fn variable_assignment_scope_hook(state: &mut Self) -> Scope
fn variable_assignment_scope_hook(state: &mut Self) -> Scope
Hook that determines the scope of a variable assignment. Read more
Auto Trait Implementations§
impl Freeze for State
impl !RefUnwindSafe for State
impl !Send for State
impl !Sync for State
impl Unpin for State
impl !UnwindSafe for State
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