pub struct Diff {
pub created_nodes: BTreeSet<Cid>,
pub deleted_nodes: BTreeSet<Cid>,
pub ops: Vec<RecordOp>,
pub proof_nodes: BTreeSet<Cid>,
}Expand description
What changed between two roots.
The two node sets are the difference of the trees as blocks, and they are not symmetric with the records: a node can be created without any record changing inside it, because a sibling changed and the node above both had to be rewritten.
Fields§
§created_nodes: BTreeSet<Cid>Nodes the second tree has and the first does not.
deleted_nodes: BTreeSet<Cid>Nodes the first tree has and the second does not.
ops: Vec<RecordOp>The records that changed, in path order.
proof_nodes: BTreeSet<Cid>The blocks that prove those record changes against the second root.
One walk per changed path, over the tree after the change: an inclusion proof for a record that is now there, an exclusion proof for one that is now gone. It is usually the created nodes over again, and it is neither a subset nor a superset of them in general — a deletion can be proved by a node that was already there, and a node can be created that no changed path walks through.
Trait Implementations§
impl Eq for Diff
impl StructuralPartialEq for Diff
Auto Trait Implementations§
impl Freeze for Diff
impl RefUnwindSafe for Diff
impl Send for Diff
impl Sync for Diff
impl Unpin for Diff
impl UnsafeUnpin for Diff
impl UnwindSafe for Diff
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.