pub struct Context<'runtime, 'program, 'reader, 'parselet> { /* private fields */ }
Expand description

Contexts represent stack frames for parselet calls.

Via the context, most operations regarding capture storing and loading is performed.

Implementations

Print debug output with context depth indention

Shortcut for an Ok(Accept::Push) with the given value. To push a value immediatelly, use context.runtime.stack.push().

Pop value off the stack.

Peek top value of stack.

Return a capture by index as RefValue.

Return a capture by name as RefValue.

Set a capture to a RefValue by index.

Set a capture to a RefValue by name.

Trait Implementations

Executes the destructor for this type. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.