pub struct HashProgress { /* private fields */ }Expand description
Monotonic progress snapshot for sequential hashing.
Implementations§
Source§impl HashProgress
impl HashProgress
Sourcepub const fn new(
bytes_hashed: u64,
total_bytes: u64,
pieces_hashed: u64,
) -> Self
pub const fn new( bytes_hashed: u64, total_bytes: u64, pieces_hashed: u64, ) -> Self
Creates a progress snapshot for shared core operations.
Sourcepub const fn bytes_hashed(self) -> u64
pub const fn bytes_hashed(self) -> u64
Returns bytes consumed from payload files.
Sourcepub const fn total_bytes(self) -> u64
pub const fn total_bytes(self) -> u64
Returns the total expected payload bytes.
Sourcepub const fn pieces_hashed(self) -> u64
pub const fn pieces_hashed(self) -> u64
Returns completed piece hashes.
Trait Implementations§
Source§impl Clone for HashProgress
impl Clone for HashProgress
Source§fn clone(&self) -> HashProgress
fn clone(&self) -> HashProgress
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 HashProgress
impl Debug for HashProgress
Source§impl PartialEq for HashProgress
impl PartialEq for HashProgress
impl Copy for HashProgress
impl Eq for HashProgress
impl StructuralPartialEq for HashProgress
Auto Trait Implementations§
impl Freeze for HashProgress
impl RefUnwindSafe for HashProgress
impl Send for HashProgress
impl Sync for HashProgress
impl Unpin for HashProgress
impl UnwindSafe for HashProgress
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