pub struct UsageTree { /* private fields */ }
Expand description
Usage tree for a family of cells.
Implementations§
Source§impl UsageTree
impl UsageTree
Sourcepub fn new(mode: UsageTreeMode) -> Self
pub fn new(mode: UsageTreeMode) -> Self
Creates a usage tree with the specified tracking mode.
Sourcepub fn with_mode_and_capacity(mode: UsageTreeMode, capacity: usize) -> Self
pub fn with_mode_and_capacity(mode: UsageTreeMode, capacity: usize) -> Self
Creates a usage tree with the specified tracking mode and a specified starting capacity.
Sourcepub fn track(&self, cell: &Cell) -> Cell
pub fn track(&self, cell: &Cell) -> Cell
Wraps the specified cell in a usage cell to keep track of the data or links being accessed.
Sourcepub fn contains(&self, repr_hash: &HashBytes) -> bool
pub fn contains(&self, repr_hash: &HashBytes) -> bool
Returns true
if the cell with the specified representation hash
is present in this usage tree.
Sourcepub fn with_subtrees(self) -> UsageTreeWithSubtrees
pub fn with_subtrees(self) -> UsageTreeWithSubtrees
Extends the usage tree with subtree tracker.
Trait Implementations§
Source§impl MerkleFilter for UsageTree
impl MerkleFilter for UsageTree
Source§fn check(&self, cell: &HashBytes) -> FilterAction
fn check(&self, cell: &HashBytes) -> FilterAction
Returns how the cell should be included in the Merkle proof or update.
Auto Trait Implementations§
impl Freeze for UsageTree
impl RefUnwindSafe for UsageTree
impl Send for UsageTree
impl Sync for UsageTree
impl Unpin for UsageTree
impl UnwindSafe for UsageTree
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