pub enum UploadEvent {
Start {
total_files: usize,
total_bytes: u64,
},
Progress {
bytes_completed: u64,
total_bytes: u64,
bytes_per_sec: Option<f64>,
transfer_bytes_completed: u64,
transfer_bytes: u64,
transfer_bytes_per_sec: Option<f64>,
files: Vec<FileProgress>,
},
Committing,
Complete,
}Expand description
Lifecycle events for a single upload operation. See the module-level
docs for the Start → Progress → Committing → Complete ordering and
the silent-gap caveats.
Variants§
Start
Upload has begun; totals are known.
Fields
Progress
Byte-level progress during the active upload phase, emitted at ~10Hz by the xet upload poll loop.
Two byte-count dimensions are reported because xet performs content-defined
deduplication. The bytes_completed / total_bytes pair tracks logical
content bytes (use for a “% processed” bar); the transfer_bytes_* triplet
tracks post-dedup network bytes actually sent (use for a “network activity”
bar). For deduplicated data, transfer_bytes ≪ total_bytes.
files is a snapshot of every xet-tracked file’s state at this event. May
be empty for operations that don’t go through xet (small inline files skip
Progress entirely).
Fields
files: Vec<FileProgress>Per-file snapshot of every xet-tracked file in the upload.
Committing
Emitted once, immediately before the commit API call. Signals that all byte
transfer is done; the call itself is silent until Complete.
Complete
Terminal event on success. Not emitted on failure — check the returned Result.
Trait Implementations§
Source§impl Clone for UploadEvent
impl Clone for UploadEvent
Source§fn clone(&self) -> UploadEvent
fn clone(&self) -> UploadEvent
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 UploadEvent
impl Debug for UploadEvent
Source§impl From<UploadEvent> for ProgressEvent
impl From<UploadEvent> for ProgressEvent
Source§fn from(event: UploadEvent) -> Self
fn from(event: UploadEvent) -> Self
Auto Trait Implementations§
impl Freeze for UploadEvent
impl RefUnwindSafe for UploadEvent
impl Send for UploadEvent
impl Sync for UploadEvent
impl Unpin for UploadEvent
impl UnsafeUnpin for UploadEvent
impl UnwindSafe for UploadEvent
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