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§
sourcefn leadin_factor_at(when: FixedU64) -> FixedU64
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.
sourcefn adapt_price(performance: SalePerformance<Balance>) -> AdaptedPrices<Balance>
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.