pub struct FeeEstimator { /* private fields */ }Expand description
Fee estimator — stateless, fed samples from recent ledgers.
Implementations§
Source§impl FeeEstimator
impl FeeEstimator
pub fn new(config: FeeConfig) -> Self
Sourcepub fn estimate_base_fee(samples: &[LedgerFeeSample]) -> Result<u32, FeeError>
pub fn estimate_base_fee(samples: &[LedgerFeeSample]) -> Result<u32, FeeError>
Median base fee from a slice of ledger samples.
Sourcepub fn estimate_stroops(
&self,
samples: &[LedgerFeeSample],
) -> Result<u64, FeeError>
pub fn estimate_stroops( &self, samples: &[LedgerFeeSample], ) -> Result<u64, FeeError>
Final estimated fee in stroops = base_fee * multiplier.
Sourcepub fn estimate_xlm(
&self,
samples: &[LedgerFeeSample],
) -> Result<String, FeeError>
pub fn estimate_xlm( &self, samples: &[LedgerFeeSample], ) -> Result<String, FeeError>
Final estimated fee in XLM string (exact integer fraction).
Trait Implementations§
Auto Trait Implementations§
impl Freeze for FeeEstimator
impl RefUnwindSafe for FeeEstimator
impl Send for FeeEstimator
impl Sync for FeeEstimator
impl Unpin for FeeEstimator
impl UnsafeUnpin for FeeEstimator
impl UnwindSafe for FeeEstimator
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