pub enum ExportProgressItem {
Size(u64),
CopyProgress(u64),
Done,
Error(Error),
}Expand description
Progress events for exporting to a local file.
Exporting does not involve outboard computation, so the events are simpler
than AddProgressItem.
Size -> CopyProgress(*n) -> Done
Errors can happen at any time, and will be reported as an Error event.
Variants§
Size(u64)
The size of the file being exported.
This is a guaranteed progress event, so you can rely on getting exactly one of these.
CopyProgress(u64)
Progress copying the file to the target directory.
On many modern systems, copying will be done with copy on write, so copying will be instantaneous and you won’t get any of these.
This is an ephemeral progress event, so you can’t rely on getting regular updates.
Done
The export is done. Once you get this event the data is available.
This is a guaranteed progress event, so you can rely on getting exactly one of these if the operation was successful.
This is one of the two possible final events. After this event, there won’t be any more progress events.
Error(Error)
The export failed with an error.
This is a guaranteed progress event, so you can rely on getting exactly one of these if the operation was unsuccessful.
This is one of the two possible final events. After this event, there won’t be any more progress events.
Trait Implementations§
Source§impl Debug for ExportProgressItem
impl Debug for ExportProgressItem
Source§impl<'de> Deserialize<'de> for ExportProgressItem
impl<'de> Deserialize<'de> for ExportProgressItem
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl From<Error> for ExportProgressItem
impl From<Error> for ExportProgressItem
Auto Trait Implementations§
impl Freeze for ExportProgressItem
impl !RefUnwindSafe for ExportProgressItem
impl Send for ExportProgressItem
impl Sync for ExportProgressItem
impl Unpin for ExportProgressItem
impl UnsafeUnpin for ExportProgressItem
impl !UnwindSafe for ExportProgressItem
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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