pub trait TierSlots {
// Required method
fn number_of_slots(price: CurrencyAmount, args: (u64, u64)) -> u16;
}Expand description
Trait for calculating the total number of tier slots for the given price.
Required Methods§
Sourcefn number_of_slots(price: CurrencyAmount, args: (u64, u64)) -> u16
fn number_of_slots(price: CurrencyAmount, args: (u64, u64)) -> u16
Returns the total number of tier slots for the given price.
§Arguments
price- price (e.g. moving average over some time period) of the native currency.args- arguments,a&b, for the linear equationnumber_of_slots = a * price + b.
Returns the total number of tier slots.
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.