Struct Invoker

Source
pub struct Invoker<'config, 'resolver, R> { /* private fields */ }
Expand description

Standard invoker.

The generic parameters are as follows:

Implementations§

Source§

impl<'config, 'resolver, R> Invoker<'config, 'resolver, R>

Source

pub const fn new(resolver: &'resolver R) -> Self

Create a new standard invoker with the given config and resolver.

Trait Implementations§

Source§

impl<'config, 'resolver, H, R> Invoker<H> for Invoker<'config, 'resolver, R>

Source§

type State = <R as Resolver<H>>::State

State type.
Source§

type Interpreter = <R as Resolver<H>>::Interpreter

Interpreter type.
Source§

type Interrupt = <<<R as Resolver<H>>::Interpreter as Interpreter<H>>::Trap as TrapConsume<CallCreateTrap>>::Rest

Possible interrupt type that may be returned by the call stack.
Source§

type TransactArgs = <<<R as Resolver<H>>::Interpreter as Interpreter<H>>::State as InvokerState>::TransactArgs

Type for transaction arguments.
Source§

type TransactValue = TransactValue

The returned value of the transaction.
Source§

type TransactInvoke = TransactInvoke<'config>

The invoke of a top-layer transaction call stack. When finalizing a transaction, this invoke is used to figure out the finalization routine.
Source§

type SubstackInvoke = SubstackInvoke

The invoke of a sub-layer call stack. When exiting a call stack, this invoke is used to figure out the exit routine.
Source§

fn new_transact( &self, args: Self::TransactArgs, handler: &mut H, ) -> Result<(Self::TransactInvoke, InvokerControl<Self::Interpreter, Self::State>), ExitError>

Create a new transaction with the given transaction arguments.
Source§

fn finalize_transact( &self, invoke: &Self::TransactInvoke, exit: InvokerExit<Self::State>, handler: &mut H, ) -> Result<Self::TransactValue, ExitError>

Finalize a transaction.
Source§

fn enter_substack( &self, trap: <R::Interpreter as Interpreter<H>>::Trap, machine: &mut Self::Interpreter, handler: &mut H, depth: usize, ) -> Capture<Result<(Self::SubstackInvoke, InvokerControl<Self::Interpreter, Self::State>), ExitError>, Self::Interrupt>

Enter a sub-layer call stack.
Source§

fn exit_substack( &self, trap_data: Self::SubstackInvoke, exit: InvokerExit<Self::State>, parent: &mut Self::Interpreter, handler: &mut H, ) -> Result<(), ExitError>

Exit a sub-layer call stack.

Auto Trait Implementations§

§

impl<'config, 'resolver, R> Freeze for Invoker<'config, 'resolver, R>

§

impl<'config, 'resolver, R> RefUnwindSafe for Invoker<'config, 'resolver, R>
where R: RefUnwindSafe,

§

impl<'config, 'resolver, R> Send for Invoker<'config, 'resolver, R>
where R: Sync,

§

impl<'config, 'resolver, R> Sync for Invoker<'config, 'resolver, R>
where R: Sync,

§

impl<'config, 'resolver, R> Unpin for Invoker<'config, 'resolver, R>

§

impl<'config, 'resolver, R> UnwindSafe for Invoker<'config, 'resolver, R>
where R: RefUnwindSafe,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

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

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> TrapConsume<T> for T

Source§

type Rest = Infallible

Rest type.
Source§

fn consume(self) -> Result<T, Infallible>

Consume T to get Rest.
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V