State

Struct State 

Source
pub struct State<Ext, Mem> {
    pub ext: Ext,
    pub memory: Mem,
    pub termination_reason: UndefinedTerminationReason,
}

Fields§

§ext: Ext§memory: Mem§termination_reason: UndefinedTerminationReason

Trait Implementations§

Source§

impl<Ext, Mem> BackendState for State<Ext, Mem>

Source§

fn set_termination_reason(&mut self, reason: UndefinedTerminationReason)

Set termination reason
Source§

fn process_fallible_func_result<T: Sized>( &mut self, res: Result<T, RunFallibleError>, ) -> Result<Result<T, u32>, UndefinedTerminationReason>

Process fallible syscall function result
Source§

fn process_alloc_func_result<T: Sized, ExtAllocError: BackendAllocSyscallError>( &mut self, res: Result<T, ExtAllocError>, ) -> Result<Result<T, ExtAllocError>, UndefinedTerminationReason>

Process alloc function result
Source§

impl<Ext: BackendExternalities, Mem> BackendTermination<Ext> for State<Ext, Mem>

Source§

fn into_parts(self) -> (Ext, UndefinedTerminationReason)

Transforms Self into tuple of externalities, memory and termination reason returned after the execution.
Source§

fn terminate<T: Debug, WasmCallErr: Debug>( self, res: Result<T, WasmCallErr>, gas: u64, ) -> (Ext, TerminationReason)

Terminates backend work after execution. Read more

Auto Trait Implementations§

§

impl<Ext, Mem> Freeze for State<Ext, Mem>
where Ext: Freeze, Mem: Freeze,

§

impl<Ext, Mem> RefUnwindSafe for State<Ext, Mem>
where Ext: RefUnwindSafe, Mem: RefUnwindSafe,

§

impl<Ext, Mem> Send for State<Ext, Mem>
where Ext: Send, Mem: Send,

§

impl<Ext, Mem> Sync for State<Ext, Mem>
where Ext: Sync, Mem: Sync,

§

impl<Ext, Mem> Unpin for State<Ext, Mem>
where Ext: Unpin, Mem: Unpin,

§

impl<Ext, Mem> UnwindSafe for State<Ext, Mem>
where Ext: UnwindSafe, Mem: UnwindSafe,

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, 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<T> JsonSchemaMaybe for T