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