#[non_exhaustive]pub enum EntryTotal {
Known(usize),
Unknown,
}Expand description
How many entries an operation has, when it knows.
A stream such as a TAR archive cannot count its entries before reading
them, so it reports Unknown rather than a count a
callback might divide by.
§Examples
use exarch_core::EntryTotal;
let total = EntryTotal::Known(3);
assert_eq!(total.known(), Some(3));
assert_eq!(EntryTotal::Unknown.known(), None);Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Known(usize)
The operation holds exactly this many entries.
Unknown
The entry count is not known until the operation ends.
Implementations§
Trait Implementations§
Source§impl Clone for EntryTotal
impl Clone for EntryTotal
impl Copy for EntryTotal
Source§impl Debug for EntryTotal
impl Debug for EntryTotal
impl Eq for EntryTotal
Source§impl PartialEq for EntryTotal
impl PartialEq for EntryTotal
impl StructuralPartialEq for EntryTotal
Auto Trait Implementations§
impl Freeze for EntryTotal
impl RefUnwindSafe for EntryTotal
impl Send for EntryTotal
impl Sync for EntryTotal
impl Unpin for EntryTotal
impl UnsafeUnpin for EntryTotal
impl UnwindSafe for EntryTotal
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.