pub struct LocalInfo { /* private fields */ }
Expand description
Local info for a blob or hash sequence.
This can be used to get the amount of missing data, and to construct a request to get the missing data.
Implementations§
Source§impl LocalInfo
impl LocalInfo
Sourcepub fn local_bytes(&self) -> u64
pub fn local_bytes(&self) -> u64
The number of bytes we have locally
Sourcepub fn is_complete(&self) -> bool
pub fn is_complete(&self) -> bool
True if the data is complete.
For a blob, this is true if the blob is complete. For a hash sequence, this is true if the hash sequence is complete and all its children are complete.
Sourcepub fn missing(&self) -> GetRequest
pub fn missing(&self) -> GetRequest
A request to get the missing data to complete this request
Trait Implementations§
Auto Trait Implementations§
impl Freeze for LocalInfo
impl RefUnwindSafe for LocalInfo
impl Send for LocalInfo
impl Sync for LocalInfo
impl Unpin for LocalInfo
impl UnwindSafe for LocalInfo
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