#[non_exhaustive]pub enum ProgressEvent {
Started {
id: ComponentId,
total: Option<u64>,
unit: ProgressUnit,
},
Progress {
id: ComponentId,
fetched: u64,
total: Option<u64>,
},
Skipped {
id: ComponentId,
},
Done {
id: ComponentId,
transferred: u64,
},
Message(String),
}Expand description
Events emitted during a pull or download operation.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Started
A new component (layer/object) has started being fetched.
Fields
§
id: ComponentIdIdentifier for this component.
§
unit: ProgressUnitUnit of measurement for total and subsequent Progress events.
Progress
Progress update for a component.
Fields
§
id: ComponentIdIdentifier for this component.
Skipped
A component was skipped because it was already present.
This event may be emitted without a preceding ProgressEvent::Started
when the component is determined to be cached before any download begins.
Renderers must handle this case gracefully.
Fields
§
id: ComponentIdIdentifier for the skipped component.
Done
A component completed successfully.
Fields
§
id: ComponentIdIdentifier for this component.
Message(String)
A human-readable status message (replaces progress-bar text lines).
Trait Implementations§
Source§impl Clone for ProgressEvent
impl Clone for ProgressEvent
Source§fn clone(&self) -> ProgressEvent
fn clone(&self) -> ProgressEvent
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ProgressEvent
impl Debug for ProgressEvent
Source§impl PartialEq for ProgressEvent
impl PartialEq for ProgressEvent
Source§fn eq(&self, other: &ProgressEvent) -> bool
fn eq(&self, other: &ProgressEvent) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for ProgressEvent
Auto Trait Implementations§
impl Freeze for ProgressEvent
impl RefUnwindSafe for ProgressEvent
impl Send for ProgressEvent
impl Sync for ProgressEvent
impl Unpin for ProgressEvent
impl UnsafeUnpin for ProgressEvent
impl UnwindSafe for ProgressEvent
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
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>
Converts
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>
Converts
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