Trait wasmer_cache::Cache
source · pub trait Cache {
type SerializeError: Error + Send + Sync;
type DeserializeError: Error + Send + Sync;
unsafe fn load(
&self,
store: &Store,
key: Hash
) -> Result<Module, Self::DeserializeError>;
fn store(
&mut self,
key: Hash,
module: &Module
) -> Result<(), Self::SerializeError>;
}
Expand description
A generic cache for storing and loading compiled wasm modules.
Required Associated Types§
sourcetype SerializeError: Error + Send + Sync
type SerializeError: Error + Send + Sync
The serialization error for the implementation
sourcetype DeserializeError: Error + Send + Sync
type DeserializeError: Error + Send + Sync
The deserialization error for the implementation