Trait TierSlots

Source
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§

Source

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 equation number_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.

Implementors§