pub struct Contract {
pub product: Product,
pub pos: Policy,
pub inventory: Policy,
pub recommendation: Rule,
pub reorder: Policy,
}Expand description
Location retail contract tying catalog product, POS policy, inventory policy, recommendation rule, and reorder policy together.
Fields§
§product: ProductSource-derived product carried by this retail contract.
pos: PolicySource-derived pos carried by this retail contract.
inventory: PolicySource-derived inventory carried by this retail contract.
recommendation: RuleSource-derived recommendation carried by this retail contract.
reorder: PolicySource-derived reorder carried by this retail contract.
Implementations§
Source§impl Contract
impl Contract
Sourcepub fn builder() -> ContractBuilder
pub fn builder() -> ContractBuilder
Create an instance of Contract using the builder syntax
Source§impl Contract
impl Contract
Sourcepub fn should_reorder(&self) -> bool
pub fn should_reorder(&self) -> bool
Reports whether the contracted inventory threshold indicates manager/vendor reorder attention is due.
Sourcepub fn standard_petsuites() -> Self
pub fn standard_petsuites() -> Self
Builds a representative PetSuites-style retail contract for docs/tests without claiming it is live policy.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Contract
impl<'de> Deserialize<'de> for Contract
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for Contract
impl StructuralPartialEq for Contract
Auto Trait Implementations§
impl Freeze for Contract
impl RefUnwindSafe for Contract
impl Send for Contract
impl Sync for Contract
impl Unpin for Contract
impl UnsafeUnpin for Contract
impl UnwindSafe for Contract
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