pub struct ContractBuilder<S: State = Empty> { /* private fields */ }Expand description
Use builder syntax to set the inputs and finish with build().
Implementations§
Source§impl<S: State> ContractBuilder<S>
impl<S: State> ContractBuilder<S>
Sourcepub fn build(self) -> Contractwhere
S: IsComplete,
pub fn build(self) -> Contractwhere
S: IsComplete,
Finish building and return the requested object
Sourcepub fn product(self, value: Product) -> ContractBuilder<SetProduct<S>>where
S::Product: IsUnset,
pub fn product(self, value: Product) -> ContractBuilder<SetProduct<S>>where
S::Product: IsUnset,
Required.
Product SKU/category facts used by sale, recommendation, inventory, and reorder decisions.
Sourcepub fn pos(self, value: Policy) -> ContractBuilder<SetPos<S>>where
S::Pos: IsUnset,
pub fn pos(self, value: Policy) -> ContractBuilder<SetPos<S>>where
S::Pos: IsUnset,
Required.
POS policy that decides which sale sources are allowed and which price actions require manager approval.
Sourcepub fn inventory(self, value: Policy) -> ContractBuilder<SetInventory<S>>where
S::Inventory: IsUnset,
pub fn inventory(self, value: Policy) -> ContractBuilder<SetInventory<S>>where
S::Inventory: IsUnset,
Required.
Inventory policy that tells staff whether stock is tracked and where reorder attention begins.
Sourcepub fn recommendation(
self,
value: Rule,
) -> ContractBuilder<SetRecommendation<S>>where
S::Recommendation: IsUnset,
pub fn recommendation(
self,
value: Rule,
) -> ContractBuilder<SetRecommendation<S>>where
S::Recommendation: IsUnset,
Required.
Recommendation rule that can create an internal upsell candidate only after safety gates pass.
Sourcepub fn reorder(self, value: Policy) -> ContractBuilder<SetReorder<S>>where
S::Reorder: IsUnset,
pub fn reorder(self, value: Policy) -> ContractBuilder<SetReorder<S>>where
S::Reorder: IsUnset,
Required.
Reorder policy that routes threshold findings to manager review, staff tasks, or vendor notices.
Auto Trait Implementations§
impl<S> Freeze for ContractBuilder<S>
impl<S> RefUnwindSafe for ContractBuilder<S>
impl<S> Send for ContractBuilder<S>
impl<S> Sync for ContractBuilder<S>
impl<S> Unpin for ContractBuilder<S>
impl<S> UnsafeUnpin for ContractBuilder<S>
impl<S> UnwindSafe for ContractBuilder<S>
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
Mutably borrows from an owned value. Read more