#[non_exhaustive]pub enum UnitOfMeasurement {
Time(TimeUnit),
ByteSize(SizeUnit),
Ether(EtherUnit),
}Expand description
General unit of measurement.
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.
Time(TimeUnit)
Unit of time measurement.
ByteSize(SizeUnit)
Unit of byte size measurement.
Ether(EtherUnit)
Unit of ether amount measurement.
Trait Implementations§
Source§impl Clone for UnitOfMeasurement
impl Clone for UnitOfMeasurement
Source§fn clone(&self) -> UnitOfMeasurement
fn clone(&self) -> UnitOfMeasurement
Returns a copy 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 UnitOfMeasurement
impl Debug for UnitOfMeasurement
Source§impl Display for UnitOfMeasurement
impl Display for UnitOfMeasurement
Source§impl From<EtherUnit> for UnitOfMeasurement
impl From<EtherUnit> for UnitOfMeasurement
Source§impl From<SizeUnit> for UnitOfMeasurement
impl From<SizeUnit> for UnitOfMeasurement
Source§impl From<TimeUnit> for UnitOfMeasurement
impl From<TimeUnit> for UnitOfMeasurement
Source§impl Hash for UnitOfMeasurement
impl Hash for UnitOfMeasurement
Source§impl PartialEq for UnitOfMeasurement
impl PartialEq for UnitOfMeasurement
impl Copy for UnitOfMeasurement
impl Eq for UnitOfMeasurement
impl StructuralPartialEq for UnitOfMeasurement
Auto Trait Implementations§
impl Freeze for UnitOfMeasurement
impl RefUnwindSafe for UnitOfMeasurement
impl Send for UnitOfMeasurement
impl Sync for UnitOfMeasurement
impl Unpin for UnitOfMeasurement
impl UnwindSafe for UnitOfMeasurement
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,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.