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.
This is not exported to bindings users 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 Ord for SiPrefix
impl Ord for SiPrefix
source§impl PartialOrd for SiPrefix
impl PartialOrd for SiPrefix
impl Copy for SiPrefix
impl Eq for SiPrefix
impl StructuralPartialEq for SiPrefix
Auto Trait Implementations§
impl Freeze for SiPrefix
impl RefUnwindSafe for SiPrefix
impl Send for SiPrefix
impl Sync for SiPrefix
impl Unpin for SiPrefix
impl UnwindSafe for SiPrefix
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,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)