Trait bao_tree::io::fsm::OutboardMut

source ·
pub trait OutboardMut: Sized {
    // Required methods
    fn save(
        &mut self,
        node: TreeNode,
        hash_pair: &(Hash, Hash)
    ) -> impl Future<Output = Result<()>>;
    fn sync(&mut self) -> impl Future<Output = Result<()>>;
}
Expand description

A mutable outboard.

This trait extends Outboard with methods to save a hash pair for a node and to set the length of the data file.

This trait can be used to incrementally save an outboard when receiving data. If you want to just ignore outboard data, there is a special placeholder outboard implementation super::outboard::EmptyOutboard.

Required Methods§

source

fn save( &mut self, node: TreeNode, hash_pair: &(Hash, Hash) ) -> impl Future<Output = Result<()>>

Save a hash pair for a node

source

fn sync(&mut self) -> impl Future<Output = Result<()>>

sync to disk

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl<'b, O: OutboardMut> OutboardMut for &'b mut O

source§

async fn save(&mut self, node: TreeNode, hash_pair: &(Hash, Hash)) -> Result<()>

source§

async fn sync(&mut self) -> Result<()>

Implementors§