Struct texlang_testing::State
source · pub struct State { /* private fields */ }
Expand description
Simple state type for simple 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.
Trait Implementations§
source§impl<'de> Deserialize<'de> for State
impl<'de> Deserialize<'de> for State
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl HasComponent<TestingComponent> for State
impl HasComponent<TestingComponent> for State
source§fn component(&self) -> &TestingComponent
fn component(&self) -> &TestingComponent
Return a immutable reference to the component.
source§fn component_mut(&mut self) -> &mut TestingComponent
fn component_mut(&mut self) -> &mut TestingComponent
Return a mutable reference to the component.
source§impl TexlangState for State
impl TexlangState for State
source§fn recoverable_error_hook(
&self,
recoverable_error: TracedError,
) -> Result<(), Box<dyn TexError>>
fn recoverable_error_hook( &self, recoverable_error: TracedError, ) -> Result<(), Box<dyn TexError>>
Hook that determines what to do when a recoverable error occurs. Read more
source§fn end_line_char(&self) -> Option<char>
fn end_line_char(&self) -> Option<char>
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 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
source§fn enable_font_hook(&mut self, font: Font)
fn enable_font_hook(&mut self, font: Font)
Hook that is invoked when a font is enabled. 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