pub enum PartialTreeLeaf {
Visible {
entry: TreeEntry,
salt: [u8; 32],
},
Redacted {
leaf_hash: ContentHash,
},
}Expand description
One leaf of a PartialTree: either fully visible (carrying its entry and
salt, so its leaf hash is recomputable) or redacted to an opaque 32-byte
leaf hash (salt, name, and target all withheld).
Variants§
Implementations§
Source§impl PartialTreeLeaf
impl PartialTreeLeaf
Sourcepub fn leaf_hash(&self) -> ContentHash
pub fn leaf_hash(&self) -> ContentHash
The leaf hash this leaf contributes to the Merkle root.
pub fn is_redacted(&self) -> bool
Trait Implementations§
Source§impl Clone for PartialTreeLeaf
impl Clone for PartialTreeLeaf
Source§fn clone(&self) -> PartialTreeLeaf
fn clone(&self) -> PartialTreeLeaf
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 PartialTreeLeaf
impl Debug for PartialTreeLeaf
impl Eq for PartialTreeLeaf
Source§impl PartialEq for PartialTreeLeaf
impl PartialEq for PartialTreeLeaf
impl StructuralPartialEq for PartialTreeLeaf
Auto Trait Implementations§
impl Freeze for PartialTreeLeaf
impl RefUnwindSafe for PartialTreeLeaf
impl Send for PartialTreeLeaf
impl Sync for PartialTreeLeaf
impl Unpin for PartialTreeLeaf
impl UnsafeUnpin for PartialTreeLeaf
impl UnwindSafe for PartialTreeLeaf
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