Struct near_primitives::types::TrieNodesCount
source · pub struct TrieNodesCount {
pub db_reads: u64,
pub mem_reads: u64,
}
Expand description
Counts trie nodes reads during tx/receipt execution for proper storage costs charging.
Fields§
§db_reads: u64
Potentially expensive trie node reads which are served from disk in the worst case.
mem_reads: u64
Cheap trie node reads which are guaranteed to be served from RAM.
Implementations§
source§impl TrieNodesCount
impl TrieNodesCount
sourcepub fn checked_sub(self, other: &Self) -> Option<Self>
pub fn checked_sub(self, other: &Self) -> Option<Self>
Used to determine the number of trie nodes charged during some operation.
Trait Implementations§
source§impl Debug for TrieNodesCount
impl Debug for TrieNodesCount
source§impl PartialEq<TrieNodesCount> for TrieNodesCount
impl PartialEq<TrieNodesCount> for TrieNodesCount
source§fn eq(&self, other: &TrieNodesCount) -> bool
fn eq(&self, other: &TrieNodesCount) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl StructuralPartialEq for TrieNodesCount
Auto Trait Implementations§
impl RefUnwindSafe for TrieNodesCount
impl Send for TrieNodesCount
impl Sync for TrieNodesCount
impl Unpin for TrieNodesCount
impl UnwindSafe for TrieNodesCount
Blanket Implementations§
§impl<T> FutureExt for T
impl<T> FutureExt for T
§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
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> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T
in a tonic::Request