pub trait EstimateFee<Balance> {
// Required method
fn estimate_fee(len: u32, info: &DispatchInfo) -> Balance;
}Expand description
Something that can estimate the fee of a (frame-based) call from its encoded length and dispatch info.
A fee depends on only those two things. EstimateCallFee takes the call itself and reads them
off it, whereas here they are passed directly. That allows pricing a call that the caller does
not have, such as one carrying a maximum-size payload that would be wasteful to build in memory
just to measure it.
Required Methods§
Sourcefn estimate_fee(len: u32, info: &DispatchInfo) -> Balance
fn estimate_fee(len: u32, info: &DispatchInfo) -> Balance
Estimate the fee of a call with the given encoded length and dispatch info.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.