Trait wasmer_cache::Cache [−][src]
A generic cache for storing and loading compiled wasm modules.
Associated Types
type SerializeError: Error + Send + Sync
[src]
The serialization error for the implementation
type DeserializeError: Error + Send + Sync
[src]
The deserialization error for the implementation
Required methods
unsafe fn load(
&self,
store: &Store,
key: Hash
) -> Result<Module, Self::DeserializeError>
[src]
&self,
store: &Store,
key: Hash
) -> Result<Module, Self::DeserializeError>
Loads a module using the provided Store
and [Hash
].
Safety
This function is unsafe as the cache store could be tampered with.
fn store(
&mut self,
key: Hash,
module: &Module
) -> Result<(), Self::SerializeError>
[src]
&mut self,
key: Hash,
module: &Module
) -> Result<(), Self::SerializeError>
Store a Module
into the cache with the given [Hash
].
Implementors
impl Cache for FileSystemCache
[src]
type DeserializeError = DeserializeError
type SerializeError = SerializeError
unsafe fn load(
&self,
store: &Store,
key: Hash
) -> Result<Module, Self::DeserializeError>
[src]
&self,
store: &Store,
key: Hash
) -> Result<Module, Self::DeserializeError>
fn store(
&mut self,
key: Hash,
module: &Module
) -> Result<(), Self::SerializeError>
[src]
&mut self,
key: Hash,
module: &Module
) -> Result<(), Self::SerializeError>