pub struct MerkleUpdate {
pub old_hash: HashBytes,
pub new_hash: HashBytes,
pub old_depth: u16,
pub new_depth: u16,
pub old: Cell,
pub new: Cell,
}Expand description
Parsed Merkle update representation.
NOTE: Serialized into MerkleUpdate cell.
Fields§
§old_hash: HashBytesRepresentation hash of the original cell.
new_hash: HashBytesRepresentation hash of the updated cell.
old_depth: u16Representation depth of the original cell.
new_depth: u16Representation depth of the updated cell.
old: CellPartially pruned tree with unchanged cells of the origin cell.
new: CellPartially pruned tree with all cells that are not in the original cell.
Implementations§
Source§impl MerkleUpdate
impl MerkleUpdate
Sourcepub fn create<'a, F>(
old: &'a DynCell,
new: &'a DynCell,
f: F,
) -> MerkleUpdateBuilder<'a, F>where
F: MerkleFilter + 'a,
pub fn create<'a, F>(
old: &'a DynCell,
new: &'a DynCell,
f: F,
) -> MerkleUpdateBuilder<'a, F>where
F: MerkleFilter + 'a,
Starts building a Merkle update between the specified cells, using old cells determined by filter.
Sourcepub fn apply(&self, old: &Cell) -> Result<Cell, Error>
pub fn apply(&self, old: &Cell) -> Result<Cell, Error>
Tries to apply this Merkle update to the specified cell, producing a new cell and using an empty cell context.
Trait Implementations§
Source§impl Clone for MerkleUpdate
impl Clone for MerkleUpdate
Source§fn clone(&self) -> MerkleUpdate
fn clone(&self) -> MerkleUpdate
Returns a duplicate 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 MerkleUpdate
impl Debug for MerkleUpdate
Source§impl Default for MerkleUpdate
impl Default for MerkleUpdate
Source§impl<'de> Deserialize<'de> for MerkleUpdate
impl<'de> Deserialize<'de> for MerkleUpdate
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Load<'_> for MerkleUpdate
impl Load<'_> for MerkleUpdate
Source§impl PartialEq for MerkleUpdate
impl PartialEq for MerkleUpdate
Source§impl Serialize for MerkleUpdate
impl Serialize for MerkleUpdate
Source§impl Store for MerkleUpdate
impl Store for MerkleUpdate
Source§fn store_into(
&self,
b: &mut CellBuilder,
_: &mut dyn CellContext,
) -> Result<(), Error>
fn store_into( &self, b: &mut CellBuilder, _: &mut dyn CellContext, ) -> Result<(), Error>
Tries to store itself into the cell builder.
impl Eq for MerkleUpdate
Auto Trait Implementations§
impl Freeze for MerkleUpdate
impl !RefUnwindSafe for MerkleUpdate
impl Send for MerkleUpdate
impl Sync for MerkleUpdate
impl Unpin for MerkleUpdate
impl !UnwindSafe for MerkleUpdate
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compares
self to key and returns true if they are equal.