Struct texlang::vm::ExecutionInput
source · pub struct ExecutionInput<S>(/* private fields */);
Expand description
Input type for execution primitives.
This type provides:
-
Access to the input stream (with or without expansion). Its implementation of the TokenStream trait returns expanded tokens. To read the input stream without performing expansion, use the unexpanded method.
-
Mutable access to the state and the commands map the ExecutionInput::state_mut and ExecutionInput::commands_map_mut methods.
Implementations§
source§impl<S> ExecutionInput<S>
impl<S> ExecutionInput<S>
sourcepub fn new(vm: &mut VM<S>) -> &mut ExecutionInput<S>
pub fn new(vm: &mut VM<S>) -> &mut ExecutionInput<S>
Creates a mutable reference to this type from the VM type.
pub fn unexpanded(&mut self) -> &mut UnexpandedStream<S>
pub fn commands_map_mut(&mut self) -> &mut Map<S>
sourcepub fn tracer_mut(&mut self) -> &mut Tracer
pub fn tracer_mut(&mut self) -> &mut Tracer
Returns a mutable reference to the tracer.
sourcepub fn vm_parts(&mut self) -> Parts<'_, S>
pub fn vm_parts(&mut self) -> Parts<'_, S>
Returns a vm::Parts struct contains mutable references to different parts of the VM.
pub fn begin_group(&mut self)
sourcepub fn return_token_buffer(&mut self, token_buffer: Vec<Token>)
pub fn return_token_buffer(&mut self, token_buffer: Vec<Token>)
Return a token buffer, allowing it to be reused.
Trait Implementations§
source§impl<S> AsMut<ExpandedStream<S>> for ExecutionInput<S>
impl<S> AsMut<ExpandedStream<S>> for ExecutionInput<S>
source§fn as_mut(&mut self) -> &mut ExpandedStream<S>
fn as_mut(&mut self) -> &mut ExpandedStream<S>
Converts this type into a mutable reference of the (usually inferred) input type.
source§impl<S: TexlangState> TokenStream for ExecutionInput<S>
impl<S: TexlangState> TokenStream for ExecutionInput<S>
source§fn next_or(&mut self) -> Result<Option<Token>>
fn next_or(&mut self) -> Result<Option<Token>>
Gets the next token in the stream or
Ok(None)
if the stream is exhausted.source§fn next<E: EndOfInputError>(&mut self, err: E) -> Result<Token>
fn next<E: EndOfInputError>(&mut self, err: E) -> Result<Token>
Gets the next token in the stream or error if the stream is exhausted. Read more
fn peek(&mut self) -> Result<Option<Token>>
source§fn commands_map(&self) -> &Map<Self::S>
fn commands_map(&self) -> &Map<Self::S>
Returns a reference to the commands map.
Auto Trait Implementations§
impl<S> !Freeze for ExecutionInput<S>
impl<S> !RefUnwindSafe for ExecutionInput<S>
impl<S> !Send for ExecutionInput<S>
impl<S> !Sync for ExecutionInput<S>
impl<S> Unpin for ExecutionInput<S>where
S: Unpin,
impl<S> UnwindSafe for ExecutionInput<S>where
S: UnwindSafe,
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