Trait bao_tree::io::fsm::OutboardMut
source · pub trait OutboardMut: Outboard {
type SaveFuture<'a>: Future<Output = Result<()>>
where Self: 'a;
type SetSizeFuture<'a>: Future<Output = Result<()>>
where Self: 'a;
// Required methods
fn save(
&mut self,
node: TreeNode,
hash_pair: &(Hash, Hash)
) -> Self::SaveFuture<'_>;
fn set_size(&mut self, len: ByteNum) -> Self::SetSizeFuture<'_>;
}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 Associated Types§
sourcetype SaveFuture<'a>: Future<Output = Result<()>>
where
Self: 'a
type SaveFuture<'a>: Future<Output = Result<()>> where Self: 'a
Future returned by save
sourcetype SetSizeFuture<'a>: Future<Output = Result<()>>
where
Self: 'a
type SetSizeFuture<'a>: Future<Output = Result<()>> where Self: 'a
Future returned by set_size
Required Methods§
sourcefn save(
&mut self,
node: TreeNode,
hash_pair: &(Hash, Hash)
) -> Self::SaveFuture<'_>
fn save( &mut self, node: TreeNode, hash_pair: &(Hash, Hash) ) -> Self::SaveFuture<'_>
Save a hash pair for a node
sourcefn set_size(&mut self, len: ByteNum) -> Self::SetSizeFuture<'_>
fn set_size(&mut self, len: ByteNum) -> Self::SetSizeFuture<'_>
Set the length of the file for which this outboard is