AmountExt

Trait AmountExt 

Source
pub trait AmountExt: Borrow<Amount> {
    // Provided methods
    fn to_msat(&self) -> u64 { ... }
    fn from_msat_ceil(value: u64) -> Amount { ... }
    fn from_msat_floor(value: u64) -> Amount { ... }
}
Expand description

Extension trait for Amount.

Provided Methods§

Source

fn to_msat(&self) -> u64

Source

fn from_msat_ceil(value: u64) -> Amount

Convert an amount from msat, rounding up.

Source

fn from_msat_floor(value: u64) -> Amount

Convert an amount from msat, rounding down.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl AmountExt for Amount

Implementors§