pub struct MathCode(pub u16);
Expand description
A math code.
The inner value is in the range [0, 32768).
See chapter 17 of the TeXBook for information on this type. The TeXBook presents an interpretation of the inner value. For example, the highest 3 bits represent the “class” of the math character. From Texlang’s perspective, however, a math character is just a regular integer and such interpretations are scoped to algorithms that consumes math characters.
Tuple Fields§
§0: u16
Implementations§
Trait Implementations§
source§impl<'de> Deserialize<'de> for MathCode
impl<'de> Deserialize<'de> for MathCode
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<S: TexlangState> Parsable<S> for MathCode
impl<S: TexlangState> Parsable<S> for MathCode
source§fn parse_impl(input: &mut ExpandedStream<S>) -> Result<Self, Box<Error>>
fn parse_impl(input: &mut ExpandedStream<S>) -> Result<Self, Box<Error>>
Parses a value from the vm::ExpandedStream.
source§impl SupportedType for MathCode
impl SupportedType for MathCode
source§fn new_command<S>(
ref_fn: RefFn<S, Self>,
ref_mut_fn: MutRefFn<S, Self>,
index_resolver: Option<IndexResolver<S>>
) -> Command<S>
fn new_command<S>( ref_fn: RefFn<S, Self>, ref_mut_fn: MutRefFn<S, Self>, index_resolver: Option<IndexResolver<S>> ) -> Command<S>
Create a new command of this type with the provided reference functions and index resolver.
source§fn update_save_stack<S>(
input: &mut ExecutionInput<S>,
variable: &TypedVariable<S, Self>,
scope: Scope,
overwritten_value: Self
)
fn update_save_stack<S>( input: &mut ExecutionInput<S>, variable: &TypedVariable<S, Self>, scope: Scope, overwritten_value: Self )
Update the VM’s save stack after a variable assignment.
source§fn new_typed_variable<S>(
command: &Command<S>,
index: Index
) -> Option<TypedVariable<S, Self>>
fn new_typed_variable<S>( command: &Command<S>, index: Index ) -> Option<TypedVariable<S, Self>>
Create a new typed variable of this type from the getters in the command and the provided index. Read more
source§fn recycle<S>(input: &mut ExecutionInput<S>, overwritten_value: Self)
fn recycle<S>(input: &mut ExecutionInput<S>, overwritten_value: Self)
Recycle a value that’s about to be dropped. Read more
impl Copy for MathCode
Auto Trait Implementations§
impl RefUnwindSafe for MathCode
impl Send for MathCode
impl Sync for MathCode
impl Unpin for MathCode
impl UnwindSafe for MathCode
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