Struct triedb::Change [−][src]
Change for a merkle trie operation.
Fields
adds: HashMap<H256, Vec<u8>>
Additions to the database.
removes: HashSet<H256>
Removals to the database.
Implementations
impl Change
[src]
pub fn add_raw(&mut self, key: H256, value: Vec<u8>)
[src]
Change to add a new raw value.
pub fn add_node(&mut self, node: &MerkleNode<'_>)
[src]
Change to add a new node.
pub fn add_value<'a, 'b, 'c>(
&'a mut self,
node: &'c MerkleNode<'b>
) -> MerkleValue<'b>
[src]
&'a mut self,
node: &'c MerkleNode<'b>
) -> MerkleValue<'b>
Change to add a new node, and return the value added.
pub fn remove_raw(&mut self, key: H256)
[src]
Change to remove a raw key.
pub fn remove_node(&mut self, node: &MerkleNode<'_>) -> bool
[src]
Change to remove a node. Return whether there’s any node being removed.
pub fn merge(&mut self, other: &Change)
[src]
Merge another change to this change.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Change
impl Send for Change
impl Sync for Change
impl Unpin for Change
impl UnwindSafe for Change
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Same<T> for T
[src]
type Output = T
Should always be Self
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
[src]
V: MultiLane<T>,