pub enum BaoChunk<R = ()> {
Parent {
node: TreeNode,
is_root: bool,
left: bool,
right: bool,
ranges: R,
},
Leaf {
start_chunk: ChunkNum,
size: usize,
is_root: bool,
ranges: R,
},
}
Expand description
A chunk describeds what to read or write next
In some cases you want additional information about what part of the chunk matches the query.
That is what the R
type parameter is for. By default it is ()
.
Variants§
Parent
expect a 64 byte parent node.
To validate, use parent_cv using the is_root value
Fields
§
ranges: R
Additional information about what part of the chunk matches the query
Leaf
expect data of size size
To validate, use hash_block using the is_root and start_chunk values
Fields
§
ranges: R
Additional information about what part of the chunk matches the query
Implementations§
Trait Implementations§
impl<R: Copy> Copy for BaoChunk<R>
impl<R: Eq> Eq for BaoChunk<R>
impl<R> StructuralPartialEq for BaoChunk<R>
Auto Trait Implementations§
impl<R> Freeze for BaoChunk<R>where
R: Freeze,
impl<R> RefUnwindSafe for BaoChunk<R>where
R: RefUnwindSafe,
impl<R> Send for BaoChunk<R>where
R: Send,
impl<R> Sync for BaoChunk<R>where
R: Sync,
impl<R> Unpin for BaoChunk<R>where
R: Unpin,
impl<R> UnwindSafe for BaoChunk<R>where
R: UnwindSafe,
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