pub struct PackageCounts(/* private fields */);Expand description
Counts of packages by PackageStateKind.
Backed by an array indexed by the kind discriminant, so adding a new
variant to PackageStateKind automatically extends the counts with
no additional code.
Implementations§
Source§impl PackageCounts
impl PackageCounts
Sourcepub fn add(&mut self, state: &PackageState)
pub fn add(&mut self, state: &PackageState)
Increment the counter for this state.
Sourcepub fn successful(&self) -> usize
pub fn successful(&self) -> usize
Packages with a successful outcome: freshly built (Success) plus
already-current binaries (UpToDate).
Sourcepub fn up_to_date(&self) -> usize
pub fn up_to_date(&self) -> usize
Packages whose existing binary was up to date.
Sourcepub fn count_alias(&self, alias: PackageStateAlias) -> usize
pub fn count_alias(&self, alias: PackageStateAlias) -> usize
Sum of counts for all kinds in an alias expansion.
Trait Implementations§
Source§impl Clone for PackageCounts
impl Clone for PackageCounts
Source§fn clone(&self) -> PackageCounts
fn clone(&self) -> PackageCounts
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 PackageCounts
impl Debug for PackageCounts
Source§impl Default for PackageCounts
impl Default for PackageCounts
Source§impl Index<PackageStateKind> for PackageCounts
impl Index<PackageStateKind> for PackageCounts
Auto Trait Implementations§
impl Freeze for PackageCounts
impl RefUnwindSafe for PackageCounts
impl Send for PackageCounts
impl Sync for PackageCounts
impl Unpin for PackageCounts
impl UnsafeUnpin for PackageCounts
impl UnwindSafe for PackageCounts
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<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§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>
Converts
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>
Converts
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