Enum trie_db::RecordedForKey
source · pub enum RecordedForKey {
Value,
Hash,
None,
}
Expand description
Result of TrieRecorder::trie_nodes_recorded_for_key
.
Variants§
Value
We recorded all trie nodes up to the value for a storage key.
This should be returned when the recorder has seen the following TrieAccess
:
TrieAccess::Value
: If we see thisTrieAccess
, it means we have recorded all the trie nodes up to the value.TrieAccess::NonExisting
: If we see thisTrieAccess
, it means we have recorded all the necessary trie nodes to prove that the value doesn’t exist in the trie.
Hash
We recorded all trie nodes up to the value hash for a storage key.
If we have a RecordedForKey::Value
, it means that we also have the hash of this value.
This also means that if we first have recorded the hash of a value and then also record the
value, the access should be upgraded to RecordedForKey::Value
.
This should be returned when the recorder has seen the following TrieAccess
:
TrieAccess::Hash
: If we see thisTrieAccess
, it means we have recorded all trie nodes to have the hash of the value.
None
We haven’t recorded any trie nodes yet for a storage key.
This means we have not seen any TrieAccess
referencing the searched key.
Implementations§
source§impl RecordedForKey
impl RecordedForKey
sourcepub fn is_none(&self) -> bool
pub fn is_none(&self) -> bool
Is self
equal to Self::None
?
Trait Implementations§
source§impl Clone for RecordedForKey
impl Clone for RecordedForKey
source§fn clone(&self) -> RecordedForKey
fn clone(&self) -> RecordedForKey
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 more