pub enum Denomination {
Bitcoin,
MilliBitcoin,
MicroBitcoin,
NanoBitcoin,
PicoBitcoin,
Bit,
Satoshi,
MilliSatoshi,
}
Expand description
A set of denominations in which amounts can be expressed.
Variants
Bitcoin
BTC
MilliBitcoin
mBTC
MicroBitcoin
uBTC
NanoBitcoin
nBTC
PicoBitcoin
pBTC
Bit
bits
Satoshi
satoshi
MilliSatoshi
msat
Trait Implementations
sourceimpl Clone for Denomination
impl Clone for Denomination
sourcefn clone(&self) -> Denomination
fn clone(&self) -> Denomination
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for Denomination
impl Debug for Denomination
sourceimpl Display for Denomination
impl Display for Denomination
sourceimpl FromStr for Denomination
impl FromStr for Denomination
sourcefn from_str(s: &str) -> Result<Self, Self::Err>
fn from_str(s: &str) -> Result<Self, Self::Err>
Convert from a str to Denomination.
Any combination of upper and/or lower case, excluding uppercase of SI(m, u, n, p) is considered valid.
- Singular: BTC, mBTC, uBTC, nBTC, pBTC
- Plural or singular: sat, satoshi, bit, msat
Due to ambiguity between mega and milli, pico and peta we prohibit usage of leading capital ‘M’, ‘P’.
type Err = ParseAmountError
type Err = ParseAmountError
The associated error which can be returned from parsing.
sourceimpl Hash for Denomination
impl Hash for Denomination
sourceimpl PartialEq<Denomination> for Denomination
impl PartialEq<Denomination> for Denomination
impl Copy for Denomination
impl Eq for Denomination
impl StructuralEq for Denomination
impl StructuralPartialEq for Denomination
Auto Trait Implementations
impl RefUnwindSafe for Denomination
impl Send for Denomination
impl Sync for Denomination
impl Unpin for Denomination
impl UnwindSafe for Denomination
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more