Struct sp_storage::TrackedStorageKey
source · pub struct TrackedStorageKey {
pub key: Vec<u8>,
pub reads: u32,
pub writes: u32,
pub whitelisted: bool,
}
Expand description
Storage key with read/write tracking information.
Fields§
§key: Vec<u8>
§reads: u32
§writes: u32
§whitelisted: bool
Implementations§
source§impl TrackedStorageKey
impl TrackedStorageKey
sourcepub fn has_been_read(&self) -> bool
pub fn has_been_read(&self) -> bool
Check if this key has been “read”, i.e. it exists in the memory overlay.
Can be true if the key has been read, has been written to, or has been whitelisted.
sourcepub fn has_been_written(&self) -> bool
pub fn has_been_written(&self) -> bool
Check if this key has been “written”, i.e. a new value will be committed to the database.
Can be true if the key has been written to, or has been whitelisted.
Trait Implementations§
source§impl Clone for TrackedStorageKey
impl Clone for TrackedStorageKey
source§fn clone(&self) -> TrackedStorageKey
fn clone(&self) -> TrackedStorageKey
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 TrackedStorageKey
impl Debug for TrackedStorageKey
source§impl Decode for TrackedStorageKey
impl Decode for TrackedStorageKey
source§impl Encode for TrackedStorageKey
impl Encode for TrackedStorageKey
source§fn encode_to<__CodecOutputEdqy: Output + ?Sized>(
&self,
__codec_dest_edqy: &mut __CodecOutputEdqy
)
fn encode_to<__CodecOutputEdqy: Output + ?Sized>(
&self,
__codec_dest_edqy: &mut __CodecOutputEdqy
)
Convert self to a slice and append it to the destination.
source§fn size_hint(&self) -> usize
fn size_hint(&self) -> usize
If possible give a hint of expected size of the encoding. Read more
source§fn using_encoded<R, F>(&self, f: F) -> Rwhere
F: FnOnce(&[u8]) -> R,
fn using_encoded<R, F>(&self, f: F) -> Rwhere
F: FnOnce(&[u8]) -> R,
Convert self to a slice and then invoke the given closure with it.
source§fn encoded_size(&self) -> usize
fn encoded_size(&self) -> usize
Calculates the encoded size. Read more
source§impl Hash for TrackedStorageKey
impl Hash for TrackedStorageKey
source§impl Ord for TrackedStorageKey
impl Ord for TrackedStorageKey
source§fn cmp(&self, other: &TrackedStorageKey) -> Ordering
fn cmp(&self, other: &TrackedStorageKey) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
source§impl PartialEq<TrackedStorageKey> for TrackedStorageKey
impl PartialEq<TrackedStorageKey> for TrackedStorageKey
source§fn eq(&self, other: &TrackedStorageKey) -> bool
fn eq(&self, other: &TrackedStorageKey) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl PartialOrd<TrackedStorageKey> for TrackedStorageKey
impl PartialOrd<TrackedStorageKey> for TrackedStorageKey
source§fn partial_cmp(&self, other: &TrackedStorageKey) -> Option<Ordering>
fn partial_cmp(&self, other: &TrackedStorageKey) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read more