[−][src]Struct cosmwasm_vm::CosmCache
Methods
impl<T> CosmCache<T> where
T: Storage + 'static, [src]
T: Storage + 'static,
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]
&mut self,
id: &[u8],
storage: T
) -> Result<Instance<T>, Error>
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,
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]
U: From<T>,
impl<T> From<T> for T[src]
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>,
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>[src]
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> Any for T where
T: 'static + ?Sized, [src]
T: 'static + ?Sized,
impl<T> Same<T> for T
type Output = T
Should always be Self