pub struct AttemptCounts {
pub downloaded: u32,
pub failed: u32,
pub cancelled: u32,
}Expand description
Counts of attempts by result kind.
Fields§
§downloaded: u32Number of successful downloads.
failed: u32Number of failed attempts.
cancelled: u32Number of cancelled attempts.
Implementations§
Source§impl AttemptCounts
impl AttemptCounts
Sourcepub const fn from_kind(kind: CompletionKind) -> Self
pub const fn from_kind(kind: CompletionKind) -> Self
Create counts with a single attempt of the given kind.
Sourcepub const fn increment(&mut self, kind: CompletionKind)
pub const fn increment(&mut self, kind: CompletionKind)
Increment the count for the given kind.
Sourcepub const fn has_retries(&self) -> bool
pub const fn has_retries(&self) -> bool
Check if there were any retry attempts (more than one total attempt).
Trait Implementations§
Source§impl Clone for AttemptCounts
impl Clone for AttemptCounts
Source§fn clone(&self) -> AttemptCounts
fn clone(&self) -> AttemptCounts
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 AttemptCounts
impl Debug for AttemptCounts
Source§impl Default for AttemptCounts
impl Default for AttemptCounts
Source§fn default() -> AttemptCounts
fn default() -> AttemptCounts
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for AttemptCounts
impl<'de> Deserialize<'de> for AttemptCounts
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 PartialEq for AttemptCounts
impl PartialEq for AttemptCounts
Source§impl Serialize for AttemptCounts
impl Serialize for AttemptCounts
impl Copy for AttemptCounts
impl Eq for AttemptCounts
impl StructuralPartialEq for AttemptCounts
Auto Trait Implementations§
impl Freeze for AttemptCounts
impl RefUnwindSafe for AttemptCounts
impl Send for AttemptCounts
impl Sync for AttemptCounts
impl Unpin for AttemptCounts
impl UnwindSafe for AttemptCounts
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