#[non_exhaustive]pub enum BadUnits {
NotPositive(Dec),
TooFine {
value: Dec,
places: u32,
},
TooLarge(Dec),
}Expand description
Why an amount has no integer form to sign.
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.
NotPositive(Dec)
Zero or negative, or cut to zero units; holds the amount.
TooFine
exact_units was given an amount finer than the places allowed.
TooLarge(Dec)
The count of units does not fit in a u64; holds the amount.
Trait Implementations§
impl Eq for BadUnits
Source§impl Error for BadUnits
impl Error for BadUnits
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0:
use the Display impl or to_string()
Source§impl From<BadUnits> for BadLiquidatorTransfer
impl From<BadUnits> for BadLiquidatorTransfer
impl StructuralPartialEq for BadUnits
Auto Trait Implementations§
impl Forget for BadUnits
impl Freeze for BadUnits
impl Move for BadUnits
impl RefUnwindSafe for BadUnits
impl Send for BadUnits
impl Sync for BadUnits
impl Unpin for BadUnits
impl UnsafeUnpin for BadUnits
impl UnwindSafe for BadUnits
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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.