Trait IntoBtc

Source
pub trait IntoBtc {
    // Required method
    fn into_btc(self) -> Amount;
}
Expand description

Trait to mark types as convertable into Amounts.

Types that implement this trait should perform the conversion from BTC amounts to satoshis e.g. an f64 performs the conversion of “0.00000025” to 25 satoshis. See Amount::from_sat.

Required Methods§

Source

fn into_btc(self) -> Amount

Performs the conversion.

Implementations on Foreign Types§

Source§

impl IntoBtc for f64

Source§

impl<'a> IntoBtc for &'a f64

Implementors§