pub struct SubTrieVisitor<'trie, 'db: 'trie> { /* private fields */ }

Implementations§

source§

impl<'trie> SubTrieVisitor<'trie, 'trie>

source

pub fn new( trie_ref: &'trie DeltaMpt, root: NodeRefDeltaMpt, owned_node_set: &'trie mut Option<OwnedNodeSet> ) -> Result<Self>

source§

impl<'trie, 'db: 'trie> SubTrieVisitor<'trie, 'db>

source

pub fn get_trie_ref(&self) -> &'trie DeltaMpt

source

pub fn get_proof<'a>(&mut self, key: &'_ [u8]) -> Result<TrieProof>

source

pub fn get(&mut self, key: &'_ [u8]) -> Result<MptValue<Box<[u8]>>>

source

pub fn get_merkle_hash_wo_compressed_path( &mut self, key: &'_ [u8] ) -> Result<Option<MerkleHash>>

source

pub fn delete( self, key: &'_ [u8] ) -> Result<(Option<Box<[u8]>>, bool, Option<NodeRefDeltaMptCompact>)>

The visitor can only be used once to modify. Returns (deleted value, is root node replaced, the current root node for the subtree).

source

pub fn delete_all( self, key: &'_ [u8], key_remaining: &'_ [u8] ) -> Result<(Option<Vec<MptKeyValue>>, bool, Option<NodeRefDeltaMptCompact>)>

The visitor can only be used once to modify. Returns (deleted value, is root node replaced, the current root node for the subtree).

source

pub fn traversal( self, key: &'_ [u8], key_remaining: &'_ [u8] ) -> Result<Option<Vec<MptKeyValue>>>

return all key/value pairs given the prefix

source

pub fn set(self, key: &'_ [u8], value: Box<[u8]>) -> Result<NodeRefDeltaMpt>

Auto Trait Implementations§

§

impl<'trie, 'db> !RefUnwindSafe for SubTrieVisitor<'trie, 'db>

§

impl<'trie, 'db> Send for SubTrieVisitor<'trie, 'db>

§

impl<'trie, 'db> Sync for SubTrieVisitor<'trie, 'db>

§

impl<'trie, 'db> Unpin for SubTrieVisitor<'trie, 'db>

§

impl<'trie, 'db> !UnwindSafe for SubTrieVisitor<'trie, 'db>

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> ElementSatisfy<ElementNoConstrain> for T

source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> Same for T

§

type Output = T

Should always be Self
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V