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.