Enum near_primitives::types::TrieCacheMode
source · pub enum TrieCacheMode {
CachingShard,
CachingChunk,
}
Expand description
Mode of the trie cache.
Variants§
CachingShard
In this mode we put each visited node to LRU cache to optimize performance. Presence of any exact node is not guaranteed.
CachingChunk
In this mode we put each visited node to the chunk cache which is a hash map. This is needed to guarantee that all nodes for which we charged a touching trie node cost are retrieved from DB only once during a single chunk processing. Such nodes remain in cache until the chunk processing is finished, and thus users (potentially different) are not required to pay twice for retrieval of the same node.
Trait Implementations§
source§impl Clone for TrieCacheMode
impl Clone for TrieCacheMode
source§fn clone(&self) -> TrieCacheMode
fn clone(&self) -> TrieCacheMode
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for TrieCacheMode
impl Debug for TrieCacheMode
source§impl PartialEq for TrieCacheMode
impl PartialEq for TrieCacheMode
source§fn eq(&self, other: &TrieCacheMode) -> bool
fn eq(&self, other: &TrieCacheMode) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl Copy for TrieCacheMode
impl Eq for TrieCacheMode
impl StructuralPartialEq for TrieCacheMode
Auto Trait Implementations§
impl Freeze for TrieCacheMode
impl RefUnwindSafe for TrieCacheMode
impl Send for TrieCacheMode
impl Sync for TrieCacheMode
impl Unpin for TrieCacheMode
impl UnwindSafe for TrieCacheMode
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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 more