pub enum StateProofBody {
Existing {
sibling_hashes: Vec<TnHash>,
},
Updating {
existing_leaf_hash: TnHash,
sibling_hashes: Vec<TnHash>,
},
Creation {
existing_leaf_pubkey: TnPubkey,
existing_leaf_hash: TnHash,
sibling_hashes: Vec<TnHash>,
},
}Expand description
State proof body variants
Variants§
Existing
For existing entries - just sibling hashes
Updating
For updating entries - existing leaf hash + sibling hashes
Creation
For creation entries - existing leaf pubkey and hash + sibling hashes
Implementations§
Source§impl StateProofBody
impl StateProofBody
Sourcepub fn sibling_hash_count(&self) -> usize
pub fn sibling_hash_count(&self) -> usize
Get the number of sibling hashes
Sourcepub fn hash_count(&self) -> usize
pub fn hash_count(&self) -> usize
Calculate the number of hashes this body contains (for footprint calculation)
Trait Implementations§
Source§impl Clone for StateProofBody
impl Clone for StateProofBody
Source§fn clone(&self) -> StateProofBody
fn clone(&self) -> StateProofBody
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 moreAuto Trait Implementations§
impl Freeze for StateProofBody
impl RefUnwindSafe for StateProofBody
impl Send for StateProofBody
impl Sync for StateProofBody
impl Unpin for StateProofBody
impl UnwindSafe for StateProofBody
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