[−][src]Struct cosmwasm_vm::CosmCache
Methods
impl<S, A> CosmCache<S, A> where
S: Storage + 'static,
A: Api + 'static, [src]
S: Storage + 'static,
A: Api + 'static,
pub unsafe fn new<P: Into<PathBuf>>(
base_dir: P,
cache_size: usize
) -> Result<Self, Error>[src]
base_dir: P,
cache_size: usize
) -> Result<Self, Error>
new stores the data for cache under base_dir
Safety
This function is marked unsafe due to FileSystemCache::new, which implicitly
assumes the disk contents are correct, and there's no way to ensure the artifacts
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],
deps: Extern<S, A>,
gas_limit: u64
) -> Result<Instance<S, A>, Error>[src]
&mut self,
id: &[u8],
deps: Extern<S, A>,
gas_limit: u64
) -> Result<Instance<S, A>, Error>
get instance returns a wasmer Instance tied to a previously saved wasm
pub fn store_instance(
&mut self,
id: &[u8],
instance: Instance<S, A>
) -> Option<Extern<S, A>>[src]
&mut self,
id: &[u8],
instance: Instance<S, A>
) -> Option<Extern<S, A>>
Auto Trait Implementations
impl<S, A> !RefUnwindSafe for CosmCache<S, A>
impl<S, A> Send for CosmCache<S, A> where
S: Send,
S: Send,
impl<S, A> !Sync for CosmCache<S, A>
impl<S, A> Unpin for CosmCache<S, A> where
A: Unpin,
S: Unpin,
A: Unpin,
S: Unpin,
impl<S, A> !UnwindSafe for CosmCache<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>,