[][src]Struct cosmwasm_vm::Instance

pub struct Instance<T: Storage + 'static> { /* fields omitted */ }

Methods

impl<T> Instance<T> where
    T: Storage + 'static, 
[src]

pub fn from_code(code: &[u8], storage: T) -> Result<Instance<T>, Error>[src]

pub fn from_module(module: &Module, storage: T) -> Result<Instance<T>, Error>[src]

pub fn get_gas(&self) -> u64[src]

pub fn set_gas(&mut self, gas: u64)[src]

pub fn with_storage<F: FnMut(&mut T)>(&self, func: F)[src]

pub fn take_storage(&self) -> Option<T>[src]

pub fn leave_storage(&self, storage: Option<T>)[src]

pub fn memory(&self, ptr: u32) -> Vec<u8>[src]

pub fn allocate(&mut self, data: &[u8]) -> Result<u32, Error>[src]

pub fn deallocate(&mut self, ptr: u32) -> Result<(), Error>[src]

pub fn func<Args, Rets>(
    &self,
    name: &str
) -> Result<Func<Args, Rets, Wasm>, Error> where
    Args: WasmTypeList,
    Rets: WasmTypeList
[src]

Auto Trait Implementations

impl<T> Send for Instance<T> where
    T: Send

impl<T> !Sync for Instance<T>

impl<T> Unpin for Instance<T> where
    T: Unpin

impl<T> !UnwindSafe for Instance<T>

impl<T> !RefUnwindSafe for Instance<T>

Blanket Implementations

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = !

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self