HeapTransact

Struct HeapTransact 

Source
pub struct HeapTransact<'backend, 'invoker, H, I: Invoker<H>>(/* private fields */);
Expand description

Heap-based call stack for a transaction. This is suitable for single stepping or debugging. The hybrid version transact uses a heap-based call stack internally after certain depth.

Implementations§

Source§

impl<'backend, 'invoker, H, I> HeapTransact<'backend, 'invoker, H, I>
where I: Invoker<H>,

Source

pub fn new( args: I::TransactArgs, invoker: &'invoker I, backend: &'backend mut H, ) -> Result<Self, ExitError>

Create a new heap-based call stack.

Source

pub fn last_interpreter(&self) -> Option<&I::Interpreter>

The machine of the last item on the call stack. This will be None if the heap stack is just created.

Source§

impl<'backend, 'invoker, H, I> HeapTransact<'backend, 'invoker, H, I>
where I: Invoker<H>, I::Interpreter: Interpreter<H>,

Source

pub fn step_run( &mut self, ) -> Result<(), Capture<Result<I::TransactValue, ExitError>, I::Interrupt>>

Step the call stack, but run the interpreter inside.

Source

pub fn run( &mut self, ) -> Capture<Result<I::TransactValue, ExitError>, I::Interrupt>

Run the call stack until it exits or receives interrupts.

Source§

impl<'backend, 'invoker, H, I> HeapTransact<'backend, 'invoker, H, I>
where I: Invoker<H>, I::Interpreter: StepInterpreter<H>,

Source

pub fn step( &mut self, ) -> Result<(), Capture<Result<I::TransactValue, ExitError>, I::Interrupt>>

Step the call stack, and step the interpreter inside.

Trait Implementations§

Source§

impl<'backend, 'invoker, H, I> Drop for HeapTransact<'backend, 'invoker, H, I>
where I: Invoker<H>,

Source§

fn drop(&mut self)

Executes the destructor for this type. Read more

Auto Trait Implementations§

§

impl<'backend, 'invoker, H, I> Freeze for HeapTransact<'backend, 'invoker, H, I>
where <I as Invoker<H>>::TransactArgs: Freeze, <I as Invoker<H>>::TransactInvoke: Freeze, <I as Invoker<H>>::Interpreter: Freeze,

§

impl<'backend, 'invoker, H, I> RefUnwindSafe for HeapTransact<'backend, 'invoker, H, I>

§

impl<'backend, 'invoker, H, I> Send for HeapTransact<'backend, 'invoker, H, I>
where <I as Invoker<H>>::TransactArgs: Send, <I as Invoker<H>>::TransactInvoke: Send, I: Sync, H: Send, <I as Invoker<H>>::Interpreter: Send, <I as Invoker<H>>::SubstackInvoke: Send, <<I as Invoker<H>>::Interpreter as Interpreter<H>>::Trap: Send,

§

impl<'backend, 'invoker, H, I> Sync for HeapTransact<'backend, 'invoker, H, I>
where <I as Invoker<H>>::TransactArgs: Sync, <I as Invoker<H>>::TransactInvoke: Sync, I: Sync, H: Sync, <I as Invoker<H>>::Interpreter: Sync, <I as Invoker<H>>::SubstackInvoke: Sync, <<I as Invoker<H>>::Interpreter as Interpreter<H>>::Trap: Sync,

§

impl<'backend, 'invoker, H, I> Unpin for HeapTransact<'backend, 'invoker, H, I>
where <I as Invoker<H>>::TransactArgs: Unpin, <I as Invoker<H>>::TransactInvoke: Unpin, <I as Invoker<H>>::Interpreter: Unpin, <I as Invoker<H>>::SubstackInvoke: Unpin,

§

impl<'backend, 'invoker, H, I> !UnwindSafe for HeapTransact<'backend, 'invoker, H, I>

Blanket Implementations§

§

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

§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

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

§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
§

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

§

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

Mutably borrows from an owned value. Read more
§

impl<T> From<T> for T

§

fn from(t: T) -> T

Returns the argument unchanged.

§

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

§

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.
§

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

§

type Error = Infallible

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

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

Performs the conversion.
§

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

§

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

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

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