Trait OutboardMut

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

A mutable outboard.

This trait provides a way 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)) -> Result<()>

Save a hash pair for a node

Source

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

Sync the outboard.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl<O: OutboardMut> OutboardMut for &mut O

Source§

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

Source§

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

Implementors§