[][src]Struct cosmwasm_vm::CosmCache

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

Methods

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

pub unsafe fn new<P: Into<PathBuf>>(base_dir: P, cache_size: usize) -> Self[src]

new stores the data for cache under base_dir

pub fn save_wasm(&mut self, wasm: &[u8]) -> Result<Vec<u8>, Error>[src]

pub fn load_wasm(&self, id: &[u8]) -> Result<Vec<u8>, Error>[src]

pub fn get_instance(
    &mut self,
    id: &[u8],
    storage: T
) -> Result<Instance<T>, Error>
[src]

get instance returns a wasmer Instance tied to a previously saved wasm

pub fn store_instance(&mut self, id: &[u8], instance: Instance<T>) -> Option<T>[src]

Auto Trait Implementations

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

impl<T> !Sync for CosmCache<T>

impl<T> Unpin for CosmCache<T>

impl<T> !UnwindSafe for CosmCache<T>

impl<T> !RefUnwindSafe for CosmCache<T>

Blanket Implementations

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

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

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

type Error = Infallible

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