pub struct TimeBasedStrategy {
pub target_time: DateTime<Utc>,
pub min_fee_rate: f64,
pub max_fee_rate: f64,
pub allow_bumping: bool,
}Expand description
Time-based fee adjustment strategy
Fields§
§target_time: DateTime<Utc>Target confirmation time (UTC)
min_fee_rate: f64Minimum acceptable fee rate (sat/vB)
max_fee_rate: f64Maximum acceptable fee rate (sat/vB)
allow_bumping: boolAllow fee bumping if needed
Implementations§
Source§impl TimeBasedStrategy
impl TimeBasedStrategy
Sourcepub fn new(
target_time: DateTime<Utc>,
min_fee_rate: f64,
max_fee_rate: f64,
) -> Self
pub fn new( target_time: DateTime<Utc>, min_fee_rate: f64, max_fee_rate: f64, ) -> Self
Create a new time-based strategy
Sourcepub fn calculate_fee_rate(&self, current_fee_rate: f64) -> f64
pub fn calculate_fee_rate(&self, current_fee_rate: f64) -> f64
Calculate appropriate fee rate based on time remaining
Sourcepub fn should_bump_fee(&self) -> bool
pub fn should_bump_fee(&self) -> bool
Check if fee bumping is recommended
Trait Implementations§
Source§impl Clone for TimeBasedStrategy
impl Clone for TimeBasedStrategy
Source§fn clone(&self) -> TimeBasedStrategy
fn clone(&self) -> TimeBasedStrategy
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for TimeBasedStrategy
impl Debug for TimeBasedStrategy
Source§impl<'de> Deserialize<'de> for TimeBasedStrategy
impl<'de> Deserialize<'de> for TimeBasedStrategy
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for TimeBasedStrategy
impl RefUnwindSafe for TimeBasedStrategy
impl Send for TimeBasedStrategy
impl Sync for TimeBasedStrategy
impl Unpin for TimeBasedStrategy
impl UnwindSafe for TimeBasedStrategy
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