pub struct ProgressCounter {
pub current: u64,
pub total: Option<u64>,
pub units: ProgressUnits,
}Expand description
Current progress.
Both current and total are abstract counters. These counters are often a
number of bytes. There is no guarantee that the counter won’t go back in
subsequent events; that can happen e.g. if a fetch happens from multiple
peers within a single attempt.
Fields§
§current: u64The current progress.
total: Option<u64>The total progress.
units: ProgressUnitsProgress units.
Implementations§
Trait Implementations§
Source§impl Clone for ProgressCounter
impl Clone for ProgressCounter
Source§fn clone(&self) -> ProgressCounter
fn clone(&self) -> ProgressCounter
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 ProgressCounter
impl Debug for ProgressCounter
Source§impl<'de> Deserialize<'de> for ProgressCounter
impl<'de> Deserialize<'de> for ProgressCounter
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
Source§impl JsonSchema for ProgressCounter
Available on crate feature schemars08 only.
impl JsonSchema for ProgressCounter
Available on crate feature
schemars08 only.Source§fn schema_name() -> String
fn schema_name() -> String
The name of the generated JSON Schema. Read more
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Generates a JSON Schema for this type. Read more
Source§fn is_referenceable() -> bool
fn is_referenceable() -> bool
Whether JSON Schemas generated for this type should be re-used where possible using the
$ref keyword. Read moreSource§impl PartialEq for ProgressCounter
impl PartialEq for ProgressCounter
Source§impl Serialize for ProgressCounter
impl Serialize for ProgressCounter
impl Eq for ProgressCounter
impl StructuralPartialEq for ProgressCounter
Auto Trait Implementations§
impl Freeze for ProgressCounter
impl RefUnwindSafe for ProgressCounter
impl Send for ProgressCounter
impl Sync for ProgressCounter
impl Unpin for ProgressCounter
impl UnsafeUnpin for ProgressCounter
impl UnwindSafe for ProgressCounter
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.