[−][src]Trait holochain_wasmer_host::prelude::cache::Cache
A generic cache for storing and loading compiled wasm modules.
The wasmer-runtime
supplies a naive FileSystemCache
api.
Associated Types
type LoadError: Debug
[src]
Error type to return when load error occurs
type StoreError: Debug
[src]
Error type to return when store error occurs
Required methods
pub fn load(&self, key: WasmHash) -> Result<Module, Self::LoadError>
[src]
loads a module using the default Backend
pub fn load_with_backend(
&self,
key: WasmHash,
backend: Backend
) -> Result<Module, Self::LoadError>
[src]
&self,
key: WasmHash,
backend: Backend
) -> Result<Module, Self::LoadError>
loads a cached module using a specific Backend
pub fn store(
&mut self,
key: WasmHash,
module: Module
) -> Result<(), Self::StoreError>
[src]
&mut self,
key: WasmHash,
module: Module
) -> Result<(), Self::StoreError>
Store a module into the cache with the given key
Implementors
impl Cache for MemoryFallbackFileSystemCache
[src]
type LoadError = CacheError
type StoreError = CacheError
pub fn load(&self, key: WasmHash) -> Result<Module, CacheError>
[src]
pub fn load_with_backend(
&self,
key: WasmHash,
backend: Backend
) -> Result<Module, CacheError>
[src]
&self,
key: WasmHash,
backend: Backend
) -> Result<Module, CacheError>