Enum lightning_invoice::SiPrefix [−][src]
pub enum SiPrefix { Milli, Micro, Nano, Pico, }
SI prefixes for the human readable part
Variants
10^-3
10^-6
10^-9
10^-12
Implementations
impl SiPrefix
[src]
impl SiPrefix
[src]pub fn multiplier(&self) -> u64
[src]
Returns the multiplier to go from a BTC value to picoBTC implied by this SiPrefix. This is effectively 10^12 * the prefix multiplier
pub fn values_desc() -> &'static [SiPrefix]ⓘ
[src]
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
impl FromStr for SiPrefix
[src]
impl FromStr for SiPrefix
[src]type Err = ParseError
The associated error which can be returned from parsing.
fn from_str(currency_prefix: &str) -> Result<Self, ParseError>
[src]
impl StructuralEq for SiPrefix
[src]
impl StructuralEq for SiPrefix
[src]impl StructuralPartialEq for SiPrefix
[src]
impl StructuralPartialEq for SiPrefix
[src]Auto Trait Implementations
impl RefUnwindSafe for SiPrefix
impl RefUnwindSafe for SiPrefix
impl UnwindSafe for SiPrefix
impl UnwindSafe for SiPrefix