pub struct ProductBuilder { /* private fields */ }Implementations§
Source§impl ProductBuilder
impl ProductBuilder
Sourcepub fn daily_quotient(self, value: f64) -> Self
pub fn daily_quotient(self, value: f64) -> Self
The expected daily customer interest for the product, expressed as a fraction of 1.0 where 1.0 means every customer wants it. This metric quantifies the product’s popularity. Note that the product’s price also influences final sales.
Sourcepub fn expected_return_rate(self, value: f64) -> Self
pub fn expected_return_rate(self, value: f64) -> Self
Expected return rate of the product, %/period.
Sourcepub fn stock_supplies_in(self, value: f64) -> Self
pub fn stock_supplies_in(self, value: f64) -> Self
Expected terms of shipment arrival from the supplier, in days. The final value for each shipment is sampled using SkewedNormal distribution with the parameters derived from the following three values. stock_supplies_in is the mean or location parameter.
Sourcepub fn supplier_inaccuracy(self, value: f64) -> Self
pub fn supplier_inaccuracy(self, value: f64) -> Self
Specifies the variability of the shipment terms. The value is a percentage of the stock_supplies_in value. The higher the value, the more uncertain the shipment terms are; values above 20% are not accepted. This value translates into the SkewNormal distribution scale parameter by the formula: scale = supplier_inaccuracy * stock_supplies_in / 1.6448536
Sourcepub fn supplier_tardiness(self, value: f64) -> Self
pub fn supplier_tardiness(self, value: f64) -> Self
Specifies the tendency of a supplier to delay the shipment. Positive values indicate a tendency to delay and measured as a percentage of the late shipments. Negative values indicate a tendency to deliver faster. Reasonable range for the value is between -0.9 and 0.7. Whereas the former is simply optimistic, the latter is rather the maximum reasonably acceptable in real life. The value translates into SkewedNormal distribution shape parameter by the formula: shape = tan(PI * (supplier_tardiness - 0.5))
pub fn product_model(self, value: Arc<ProductModel>) -> Self
Sourcepub fn view_probability(self, value: f64) -> Self
pub fn view_probability(self, value: f64) -> Self
How likely the product is to be viewed by a customer when purchase decision is being made.
pub fn new() -> Self
Sourcepub fn build(&mut self) -> Result<Product, FieldXError>
pub fn build(&mut self) -> Result<Product, FieldXError>
Builds the struct from the builder object.
Trait Implementations§
Source§impl Default for ProductBuilder
impl Default for ProductBuilder
Source§fn default() -> ProductBuilder
fn default() -> ProductBuilder
Auto Trait Implementations§
impl Freeze for ProductBuilder
impl !RefUnwindSafe for ProductBuilder
impl Send for ProductBuilder
impl Sync for ProductBuilder
impl Unpin for ProductBuilder
impl !UnwindSafe for ProductBuilder
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
Source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::RequestSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self to the equivalent element of its superset.