pub struct FeeRate(/* private fields */);Expand description
Represents fee rate.
This is an integer type representing fee rate in sat/kwu. It provides protection against mixing up the types as well as basic formatting features.
Implementations§
Source§impl FeeRate
impl FeeRate
Sourcepub fn from_sat_per_vb(sat_vb: u64) -> Result<Self, FeeRateError>
pub fn from_sat_per_vb(sat_vb: u64) -> Result<Self, FeeRateError>
Constructs FeeRate from satoshis per virtual bytes.
Sourcepub fn from_sat_per_kwu(sat_kwu: u64) -> Self
pub fn from_sat_per_kwu(sat_kwu: u64) -> Self
Constructs FeeRate from satoshis per 1000 weight units.
Sourcepub fn to_sat_per_vb_ceil(&self) -> u64
pub fn to_sat_per_vb_ceil(&self) -> u64
Converts to sat/vB rounding up.
Sourcepub fn to_sat_per_vb_floor(&self) -> u64
pub fn to_sat_per_vb_floor(&self) -> u64
Converts to sat/vB rounding down.
Sourcepub fn to_sat_per_kwu(&self) -> u64
pub fn to_sat_per_kwu(&self) -> u64
Returns raw fee rate.
Trait Implementations§
Source§impl<UT> LowerError<UT> for FeeRate
impl<UT> LowerError<UT> for FeeRate
Source§fn lower_error(obj: Self) -> RustBuffer
fn lower_error(obj: Self) -> RustBuffer
Lower this value for scaffolding function return Read more
Source§impl<UT> LowerReturn<UT> for FeeRate
impl<UT> LowerReturn<UT> for FeeRate
Source§type ReturnType = <Arc<FeeRate> as LowerReturn<UniFfiTag>>::ReturnType
type ReturnType = <Arc<FeeRate> as LowerReturn<UniFfiTag>>::ReturnType
The type that should be returned by scaffolding functions for this type. Read more
Source§fn lower_return(obj: Self) -> Result<Self::ReturnType, RustCallError>
fn lower_return(obj: Self) -> Result<Self::ReturnType, RustCallError>
Lower the return value from an scaffolding call Read more
§fn handle_failed_lift(
error: LiftArgsError,
) -> Result<Self::ReturnType, RustCallError>
fn handle_failed_lift( error: LiftArgsError, ) -> Result<Self::ReturnType, RustCallError>
Lower the return value for failed argument lifts Read more
Auto Trait Implementations§
impl Freeze for FeeRate
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T, UT> HandleAlloc<UT> for T
impl<T, UT> HandleAlloc<UT> for T
§fn new_handle(value: Arc<T>) -> Handle
fn new_handle(value: Arc<T>) -> Handle
Create a new handle for an Arc value Read more
§unsafe fn clone_handle(handle: Handle) -> Handle
unsafe fn clone_handle(handle: Handle) -> Handle
Clone a handle Read more
§unsafe fn consume_handle(handle: Handle) -> Arc<T>
unsafe fn consume_handle(handle: Handle) -> Arc<T>
Consume a handle, getting back the initial
Arc<> Read more