pub struct TaskProgress {
pub fraction: Option<f32>,
pub steps: Option<(u32, u32)>,
pub bytes: Option<(u64, u64)>,
pub items: Option<(u32, u32)>,
pub eta_secs: Option<u64>,
pub message: Option<String>,
}Expand description
Progress information for a task.
Fields§
§fraction: Option<f32>Progress as fraction (0.0 - 1.0), None if indeterminate
steps: Option<(u32, u32)>Current step / total steps
bytes: Option<(u64, u64)>Bytes processed / total bytes
items: Option<(u32, u32)>Items processed / total items
eta_secs: Option<u64>ETA in seconds
message: Option<String>Current status message
Implementations§
Source§impl TaskProgress
impl TaskProgress
Sourcepub fn indeterminate() -> Self
pub fn indeterminate() -> Self
Create indeterminate progress.
Sourcepub fn with_message(self, msg: impl Into<String>) -> Self
pub fn with_message(self, msg: impl Into<String>) -> Self
Add a message to the progress.
Trait Implementations§
Source§impl Clone for TaskProgress
impl Clone for TaskProgress
Source§fn clone(&self) -> TaskProgress
fn clone(&self) -> TaskProgress
Returns a duplicate of the value. Read more
1.0.0 · 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 TaskProgress
impl Debug for TaskProgress
Source§impl<'de> Deserialize<'de> for TaskProgress
impl<'de> Deserialize<'de> for TaskProgress
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>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for TaskProgress
impl RefUnwindSafe for TaskProgress
impl Send for TaskProgress
impl Sync for TaskProgress
impl Unpin for TaskProgress
impl UnsafeUnpin for TaskProgress
impl UnwindSafe for TaskProgress
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