pub struct DownloadTarget<'a> {
pub hash: [u8; 32],
pub total_bytes: u64,
pub dest: &'a Path,
pub ranges: Option<&'a [(u64, u64)]>,
}Expand description
One blob to fetch and where to write it: the content hash (the bao root),
its total_bytes (authoritative for keying the store and sizing the fetch),
the caller-chosen dest path the .partial and final file are keyed by,
and the byte ranges to fill.
Fields§
§hash: [u8; 32]The blob’s BLAKE3 content address (its bao root); every ingested byte is verified against it.
total_bytes: u64The blob’s content length in bytes.
dest: &'a PathWhere to write the finished blob. The .partial store and the promoted
final file are keyed by this path, so the finished file IS dest.
ranges: Option<&'a [(u64, u64)]>The (offset, len) byte ranges to fill, or None for the whole blob.
The fetch promotes the blob only when every byte is present, so a
caller that writes the bytes outside them itself (a bundle entry’s
donor splice) finds them in the .partial beside dest.
Trait Implementations§
Source§impl<'a> Clone for DownloadTarget<'a>
impl<'a> Clone for DownloadTarget<'a>
impl<'a> Copy for DownloadTarget<'a>
Auto Trait Implementations§
impl<'a> Freeze for DownloadTarget<'a>
impl<'a> RefUnwindSafe for DownloadTarget<'a>
impl<'a> Send for DownloadTarget<'a>
impl<'a> Sync for DownloadTarget<'a>
impl<'a> Unpin for DownloadTarget<'a>
impl<'a> UnsafeUnpin for DownloadTarget<'a>
impl<'a> UnwindSafe for DownloadTarget<'a>
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more