pub struct V2HashResult { /* private fields */ }Expand description
Per-file BEP 52 Merkle result.
Implementations§
Source§impl V2HashResult
impl V2HashResult
Sourcepub const fn pieces_root(&self) -> Option<&[u8; 32]>
pub const fn pieces_root(&self) -> Option<&[u8; 32]>
Returns no root for an empty file and the BEP 52 root otherwise.
Sourcepub fn piece_layer(&self) -> &[[u8; 32]]
pub fn piece_layer(&self) -> &[[u8; 32]]
Returns piece-layer hashes only when the file exceeds one piece.
Sourcepub const fn total_bytes(&self) -> u64
pub const fn total_bytes(&self) -> u64
Returns payload bytes consumed from the file.
Trait Implementations§
Source§impl Clone for V2HashResult
impl Clone for V2HashResult
Source§fn clone(&self) -> V2HashResult
fn clone(&self) -> V2HashResult
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for V2HashResult
impl Debug for V2HashResult
Source§impl PartialEq for V2HashResult
impl PartialEq for V2HashResult
impl Eq for V2HashResult
impl StructuralPartialEq for V2HashResult
Auto Trait Implementations§
impl Freeze for V2HashResult
impl RefUnwindSafe for V2HashResult
impl Send for V2HashResult
impl Sync for V2HashResult
impl Unpin for V2HashResult
impl UnwindSafe for V2HashResult
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