Enum iroh_blobs::get::db::BlobInfo
source · pub enum BlobInfo<D: BaoStore> {
Complete {
size: u64,
},
Partial {
entry: D::EntryMut,
valid_ranges: ChunkRanges,
},
Missing,
}
Expand description
Information about a the status of a blob in a store.
Variants§
Complete
we have the blob completely
Partial
we have the blob partially
Fields
§
valid_ranges: ChunkRanges
The ranges that are available locally.
Missing
we don’t have the blob at all
Implementations§
source§impl<D: BaoStore> BlobInfo<D>
impl<D: BaoStore> BlobInfo<D>
sourcepub fn size(&self) -> Option<BaoBlobSize>
pub fn size(&self) -> Option<BaoBlobSize>
The size of the blob, if known.
sourcepub fn valid_ranges(&self) -> ChunkRanges
pub fn valid_ranges(&self) -> ChunkRanges
Ranges that are valid locally.
This will be all for complete blobs, empty for missing blobs, and a set with possibly open last range for partial blobs.
sourcepub fn missing_ranges(&self) -> ChunkRanges
pub fn missing_ranges(&self) -> ChunkRanges
Ranges that are missing locally and need to be requested.
This will be empty for complete blobs, all for missing blobs, and a set with possibly open last range for partial blobs.
Trait Implementations§
Auto Trait Implementations§
impl<D> Freeze for BlobInfo<D>
impl<D> RefUnwindSafe for BlobInfo<D>
impl<D> Send for BlobInfo<D>
impl<D> Sync for BlobInfo<D>
impl<D> Unpin for BlobInfo<D>
impl<D> UnwindSafe for BlobInfo<D>
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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