Struct wasmtime_cache::ModuleCacheEntry [−][src]
Module level cache entry.
Implementations
impl<'config> ModuleCacheEntry<'config>
[src][−]
pub fn new<'data>(
compiler_name: &str,
cache_config: &'config CacheConfig
) -> Self
[src][−]
compiler_name: &str,
cache_config: &'config CacheConfig
) -> Self
Create the cache entry.
pub fn get_data<T, U, E>(
&self,
state: T,
compute: fn(_: T) -> Result<U, E>
) -> Result<U, E> where
T: Hash,
U: Serialize + for<'a> Deserialize<'a>,
[src][−]
&self,
state: T,
compute: fn(_: T) -> Result<U, E>
) -> Result<U, E> where
T: Hash,
U: Serialize + for<'a> Deserialize<'a>,
Gets cached data if state matches, otherwise calls the compute
.
Auto Trait Implementations
impl<'config> RefUnwindSafe for ModuleCacheEntry<'config>
impl<'config> Send for ModuleCacheEntry<'config>
impl<'config> Sync for ModuleCacheEntry<'config>
impl<'config> Unpin for ModuleCacheEntry<'config>
impl<'config> UnwindSafe for ModuleCacheEntry<'config>
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,
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
[src]
type Output = T
Should always be Self
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src][+]
U: Into<T>,
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src][+]
U: TryFrom<T>,