Struct tfm::ligkern::lang::Instruction
source · pub struct Instruction {
pub next_instruction: Option<u8>,
pub right_char: Char,
pub operation: Operation,
}
Expand description
A single instruction in a lig/kern program.
In TFM files, instructions are serialized to 32 bit integers.
In property list files, instructions are specified using a (LIG _ _)
or (KERN _ _)
element,
and optionally a (STOP)
or (SKIP _)
element directly after.
Fields§
§next_instruction: Option<u8>
Specifies the next instruction to run if this instruction is not applicable -
e.g., if the right character of the pair is not right_char
.
If the payload is present, that number of lig/kern instructions in the list of all instructions are skipped to
find the next instruction.
Otherwise this is the final instruction and there are no more instructions to consider.
right_char: Char
This instruction is run if the right character in the pair is this character.
Otherwise the next lig kern instruction for the current character is considered,
using the next_instruction
field.
After this operation is performed,
no more operations need to be performed on this pair.
However the result of the operation may result in a new pair being created
and the lig/kern program will run for that pair.
See the documentation on PostLigOperation
for information on that.
operation: Operation
The operation to perform for this instruction.
Trait Implementations§
source§impl Clone for Instruction
impl Clone for Instruction
source§fn clone(&self) -> Instruction
fn clone(&self) -> Instruction
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for Instruction
impl Debug for Instruction
source§impl PartialEq for Instruction
impl PartialEq for Instruction
impl Eq for Instruction
impl StructuralPartialEq for Instruction
Auto Trait Implementations§
impl Freeze for Instruction
impl RefUnwindSafe for Instruction
impl Send for Instruction
impl Sync for Instruction
impl Unpin for Instruction
impl UnwindSafe for Instruction
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)