pub enum ExcludeStrategy {
LeastExpensive,
MostExpensive,
}
Expand description
Indicates which products matched by a CatalogPricingRule will be excluded if the pricing rule uses an exclude set.
Variants§
LeastExpensive
The least expensive matched products are excluded from the pricing. If the pricing rule is set to exclude one product and multiple products in the match set qualify as least expensive, then one will be excluded at random.
Excluding the least expensive product gives the best discount value to the buyer.
MostExpensive
The most expensive matched product is excluded from the pricing rule. If multiple products have the same price and all qualify as least expensive, one will be excluded at random.
This guarantees that the most expensive product is purchased at full price.
Trait Implementations§
Source§impl Clone for ExcludeStrategy
impl Clone for ExcludeStrategy
Source§fn clone(&self) -> ExcludeStrategy
fn clone(&self) -> ExcludeStrategy
Returns a duplicate of the value. Read more
1.0.0 · Source§const fn clone_from(&mut self, source: &Self)
const fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for ExcludeStrategy
impl Debug for ExcludeStrategy
Source§impl<'de> Deserialize<'de> for ExcludeStrategy
impl<'de> Deserialize<'de> for ExcludeStrategy
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
Source§impl PartialEq for ExcludeStrategy
impl PartialEq for ExcludeStrategy
Source§impl Serialize for ExcludeStrategy
impl Serialize for ExcludeStrategy
impl Eq for ExcludeStrategy
impl StructuralPartialEq for ExcludeStrategy
Auto Trait Implementations§
impl Freeze for ExcludeStrategy
impl RefUnwindSafe for ExcludeStrategy
impl Send for ExcludeStrategy
impl Sync for ExcludeStrategy
impl Unpin for ExcludeStrategy
impl UnwindSafe for ExcludeStrategy
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.