referrerpolicy=no-referrer-when-downgrade

Trait pallet_broker::AdaptPrice

source ·
pub trait AdaptPrice<Balance> {
    // Required methods
    fn leadin_factor_at(when: FixedU64) -> FixedU64;
    fn adapt_price(
        performance: SalePerformance<Balance>,
    ) -> AdaptedPrices<Balance>;
}
Expand description

Type for determining how to set price.

Required Methods§

source

fn leadin_factor_at(when: FixedU64) -> FixedU64

Return the factor by which the regular price must be multiplied during the leadin period.

  • when: The amount through the leadin period; between zero and one.
source

fn adapt_price(performance: SalePerformance<Balance>) -> AdaptedPrices<Balance>

Return adapted prices for next sale.

Based on the previous sale’s performance.

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl<Balance: Copy> AdaptPrice<Balance> for ()

source§

fn leadin_factor_at(_: FixedU64) -> FixedU64

source§

fn adapt_price(performance: SalePerformance<Balance>) -> AdaptedPrices<Balance>

Implementors§

source§

impl<Balance: FixedPointOperand> AdaptPrice<Balance> for CenterTargetPrice<Balance>