pub struct FeeRate(/* private fields */);
Expand description
Fee rate
Implementations§
source§impl FeeRate
impl FeeRate
sourcepub fn from_sat_per_kwu(sat_per_kwu: f32) -> Self
pub fn from_sat_per_kwu(sat_per_kwu: f32) -> Self
Create a new instance of FeeRate
given a float fee rate in sats/kwu
sourcepub fn from_sat_per_kvb(sat_per_kvb: f32) -> Self
pub fn from_sat_per_kvb(sat_per_kvb: f32) -> Self
Create a new instance of FeeRate
given a float fee rate in sats/kvb
sourcepub fn from_btc_per_kvb(btc_per_kvb: f32) -> Self
pub fn from_btc_per_kvb(btc_per_kvb: f32) -> Self
sourcepub fn from_sat_per_vb(sat_per_vb: f32) -> Self
pub fn from_sat_per_vb(sat_per_vb: f32) -> Self
sourcepub const fn default_min_relay_fee() -> Self
pub const fn default_min_relay_fee() -> Self
Create a new FeeRate
with the default min relay fee value
sourcepub fn from_wu(fee: u64, wu: Weight) -> FeeRate
pub fn from_wu(fee: u64, wu: Weight) -> FeeRate
Calculate fee rate from fee
and weight units (wu
).
sourcepub fn as_sat_per_vb(&self) -> f32
pub fn as_sat_per_vb(&self) -> f32
Return the value as satoshi/vbyte
Trait Implementations§
source§impl PartialEq for FeeRate
impl PartialEq for FeeRate
source§impl PartialOrd for FeeRate
impl PartialOrd for FeeRate
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moreimpl Copy for FeeRate
impl StructuralPartialEq for FeeRate
Auto Trait Implementations§
impl RefUnwindSafe for FeeRate
impl Send for FeeRate
impl Sync for FeeRate
impl Unpin for FeeRate
impl UnwindSafe for FeeRate
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