Skip to main content

ShardTreeExt

Trait ShardTreeExt 

Source
pub trait ShardTreeExt {
    // Required methods
    fn append_checkpoint(
        &mut self,
        checkpoint_id: BlockHeight,
    ) -> Result<CheckpointAppendOutcome, ShardTreeError<Infallible>>;
    fn rollback_to_checkpoint(
        &mut self,
        checkpoint_id: BlockHeight,
    ) -> Result<RollbackOutcome, ShardTreeError<Infallible>>;
}
Expand description

The boundary wrapper over shardtree’s boolean operations, exported so downstream crates route through it too (zingolib’s legacy wallet import does. Its own source-walk test enforces its confinement).

Required Methods§

Source

fn append_checkpoint( &mut self, checkpoint_id: BlockHeight, ) -> Result<CheckpointAppendOutcome, ShardTreeError<Infallible>>

As ShardTree::checkpoint, with the boolean classified: append a checkpoint recording the tree’s current frontier at the id.

Source

fn rollback_to_checkpoint( &mut self, checkpoint_id: BlockHeight, ) -> Result<RollbackOutcome, ShardTreeError<Infallible>>

As ShardTree::truncate_to_checkpoint, with the boolean classified.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl<H, const DEPTH: u8, const SHARD_HEIGHT: u8> ShardTreeExt for ShardTree<MemoryShardStore<H, BlockHeight>, DEPTH, SHARD_HEIGHT>
where H: Hashable + Clone + PartialEq,

Implementors§