pub struct DeserializedModuleCache { /* private fields */ }
Expand description
Caches deserialized wasm modules. Deserialization of cached modules from the cache to create callable instances is slow. Therefore modules are cached in memory after deserialization.
Trait Implementations§
source§impl Debug for DeserializedModuleCache
impl Debug for DeserializedModuleCache
source§impl Default for DeserializedModuleCache
impl Default for DeserializedModuleCache
source§fn default() -> DeserializedModuleCache
fn default() -> DeserializedModuleCache
Returns the “default value” for a type. Read more
source§impl PlruCache for DeserializedModuleCache
impl PlruCache for DeserializedModuleCache
source§fn plru_mut(&mut self) -> &mut MicroCache
fn plru_mut(&mut self) -> &mut MicroCache
Accessor for mutable reference to internal plru cache.
source§fn key_map_mut(&mut self) -> &mut PlruKeyMap
fn key_map_mut(&mut self) -> &mut PlruKeyMap
Mutable accessor to mapping between plru cache bits and cache keys.
source§fn key_map(&self) -> &PlruKeyMap
fn key_map(&self) -> &PlruKeyMap
Accessor to mapping between plru cache bits and cache keys.
source§fn cache(&self) -> &BTreeMap<CacheKey, Arc<Self::Item>>
fn cache(&self) -> &BTreeMap<CacheKey, Arc<Self::Item>>
Accessor to the cache key addressable cache of items.
source§fn cache_mut(&mut self) -> &mut BTreeMap<CacheKey, Arc<Self::Item>>
fn cache_mut(&mut self) -> &mut BTreeMap<CacheKey, Arc<Self::Item>>
Mutable accessor to the cache key addressable cache of items.
source§fn put_item(&mut self, key: CacheKey, item: Arc<Self::Item>) -> Arc<Self::Item>
fn put_item(&mut self, key: CacheKey, item: Arc<Self::Item>) -> Arc<Self::Item>
Put an item in both the plru cache and the item cache by its cache key.
If the cache is full, the roughly most stale plru will be evicted from the
item cache and reassigned to the new item.
source§fn plru_key(&self, key: &CacheKey) -> usize
fn plru_key(&self, key: &CacheKey) -> usize
Get the plru key for a given cache key. Will panic if the mapping does not
exist so the caller MUST NOT request the plru on a cache miss AND that the
cache is never set such as to cause a hit without also setting the plru.
source§fn touch(&mut self, key: &CacheKey)
fn touch(&mut self, key: &CacheKey)
Touches the plru such that the given CacheKey becomes the most recently
used item.
source§fn trash(&mut self, key: &CacheKey)
fn trash(&mut self, key: &CacheKey)
Delete the plru for a given cache key. Care must be taken to ensure this
is not called before a subsequent call to
plru_key
or it will panic.Auto Trait Implementations§
impl !Freeze for DeserializedModuleCache
impl RefUnwindSafe for DeserializedModuleCache
impl Send for DeserializedModuleCache
impl Sync for DeserializedModuleCache
impl Unpin for DeserializedModuleCache
impl UnwindSafe for DeserializedModuleCache
Blanket Implementations§
source§impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
§type ArchivedMetadata = ()
type ArchivedMetadata = ()
The archived version of the pointer metadata for this type.
source§fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata
) -> <T as Pointee>::Metadata
fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata ) -> <T as Pointee>::Metadata
Converts some archived metadata to the pointer metadata for itself.
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
source§impl<F, W, T, D> Deserialize<With<T, W>, D> for F
impl<F, W, T, D> Deserialize<With<T, W>, D> for F
source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§impl<T> LayoutRaw for T
impl<T> LayoutRaw for T
source§fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
Gets the layout of the type.
source§impl<T> Pointable for T
impl<T> Pointable for T
source§impl<T> Upcastable for T
impl<T> Upcastable for T
source§fn upcast_any_ref(&self) -> &(dyn Any + 'static)
fn upcast_any_ref(&self) -> &(dyn Any + 'static)
upcast ref
source§fn upcast_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn upcast_any_mut(&mut self) -> &mut (dyn Any + 'static)
upcast mut ref