pub enum DownloadEvent {
Start {
total_files: usize,
total_bytes: u64,
},
Progress {
files: Vec<FileProgress>,
},
AggregateProgress {
bytes_completed: u64,
total_bytes: u64,
bytes_per_sec: Option<f64>,
},
Complete,
}Expand description
Lifecycle events for a single download operation. See the module-level
docs for ordering, the two-channel Progress vs AggregateProgress
model, and cache-hit fast paths.
Variants§
Start
Download operation has begun; totals are known. Fires after the HEAD round-trip
(or HEAD fan-out for snapshot_download).
Fields
Progress
Per-file progress delta — files contains only files whose status or
byte count changed since the previous Progress event. Consumers wanting a
running view of every file must accumulate state by filename.
Fields
files: Vec<FileProgress>Files whose state changed since the previous Progress event.
AggregateProgress
Aggregate byte-level progress for the in-flight xet batch (~10Hz). Reports cumulative bytes for the entire batch with no per-file breakdown — xet reports aggregate stats only.
Fields
Complete
Terminal event on success. Not emitted on failure — check the returned Result.
Trait Implementations§
Source§impl Clone for DownloadEvent
impl Clone for DownloadEvent
Source§fn clone(&self) -> DownloadEvent
fn clone(&self) -> DownloadEvent
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for DownloadEvent
impl Debug for DownloadEvent
Source§impl From<DownloadEvent> for ProgressEvent
impl From<DownloadEvent> for ProgressEvent
Source§fn from(event: DownloadEvent) -> Self
fn from(event: DownloadEvent) -> Self
Auto Trait Implementations§
impl Freeze for DownloadEvent
impl RefUnwindSafe for DownloadEvent
impl Send for DownloadEvent
impl Sync for DownloadEvent
impl Unpin for DownloadEvent
impl UnsafeUnpin for DownloadEvent
impl UnwindSafe for DownloadEvent
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> DropFlavorWrapper<T> for T
impl<T> DropFlavorWrapper<T> for T
Source§impl<T, W> HasTypeWitness<W> for Twhere
W: MakeTypeWitness<Arg = T>,
T: ?Sized,
impl<T, W> HasTypeWitness<W> for Twhere
W: MakeTypeWitness<Arg = T>,
T: ?Sized,
Source§impl<T> Identity for Twhere
T: ?Sized,
impl<T> Identity for Twhere
T: ?Sized,
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