[−][src]Struct cosmwasm_vm::Instance
Fields
api: AMethods
impl<S, A> Instance<S, A> where
S: Storage + 'static,
A: Api + 'static, [src]
S: Storage + 'static,
A: Api + 'static,
pub fn from_code(
code: &[u8],
deps: Extern<S, A>,
gas_limit: u64
) -> Result<Self>[src]
code: &[u8],
deps: Extern<S, A>,
gas_limit: u64
) -> Result<Self>
pub fn from_module(
module: &Module,
deps: Extern<S, A>,
gas_limit: u64
) -> Result<Self>[src]
module: &Module,
deps: Extern<S, A>,
gas_limit: u64
) -> Result<Self>
pub fn from_wasmer(
wasmer_instance: Instance,
deps: Extern<S, A>,
gas_limit: u64
) -> Self[src]
wasmer_instance: Instance,
deps: Extern<S, A>,
gas_limit: u64
) -> Self
pub fn recycle(instance: Self) -> (Instance, Option<Extern<S, A>>)[src]
Takes ownership of instance and decomposes it into its components. The components we want to preserve are returned, the rest is dropped.
pub fn get_gas(&self) -> u64[src]
pub fn with_storage<F: FnMut(&mut S)>(&self, func: F)[src]
pub fn memory(&self, ptr: u32) -> Vec<u8>[src]
pub fn allocate(&mut self, data: &[u8]) -> Result<u32>[src]
pub fn deallocate(&mut self, ptr: u32) -> Result<()>[src]
pub fn func<Args, Rets>(&self, name: &str) -> Result<Func<Args, Rets, Wasm>> where
Args: WasmTypeList,
Rets: WasmTypeList, [src]
Args: WasmTypeList,
Rets: WasmTypeList,
Auto Trait Implementations
impl<S, A> !RefUnwindSafe for Instance<S, A>
impl<S, A> Send for Instance<S, A> where
S: Send,
S: Send,
impl<S, A> !Sync for Instance<S, A>
impl<S, A> Unpin for Instance<S, A> where
A: Unpin,
S: Unpin,
A: Unpin,
S: Unpin,
impl<S, A> !UnwindSafe for Instance<S, A>
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized, [src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T[src]
impl<T> From<T> for T[src]
impl<T, U> Into<U> for T where
U: From<T>, [src]
U: From<T>,
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<T, U> TryFrom<U> for T where
U: Into<T>, [src]
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>[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>, [src]
U: TryFrom<T>,