Enum lightning_invoice::SiPrefix
source · pub enum SiPrefix {
Milli,
Micro,
Nano,
Pico,
}
Expand description
SI prefixes for the human readable part
Variants§
Implementations§
source§impl SiPrefix
impl SiPrefix
sourcepub fn multiplier(&self) -> u64
pub fn multiplier(&self) -> u64
Returns the multiplier to go from a BTC value to picoBTC implied by this SiPrefix. This is effectively 10^12 * the prefix multiplier
sourcepub fn values_desc() -> &'static [SiPrefix]
pub fn values_desc() -> &'static [SiPrefix]
Returns all enum variants of SiPrefix
sorted in descending order of their associated
multiplier.
(C-not exported) As we don’t yet support a slice of enums, and also because this function isn’t the most critical to expose.
Trait Implementations§
source§impl FromStr for SiPrefix
impl FromStr for SiPrefix
§type Err = ParseError
type Err = ParseError
The associated error which can be returned from parsing.