pub struct PromotionCondition {
pub id: Uuid,
pub promotion_id: PromotionId,
pub condition_type: ConditionType,
pub operator: ConditionOperator,
pub value: String,
pub is_required: bool,
}Expand description
A condition that must be met for promotion to apply
Fields§
§id: Uuid§promotion_id: PromotionId§condition_type: ConditionType§operator: ConditionOperator§value: StringThe value to compare against (string, number, or JSON array)
is_required: boolWhether all conditions must be met (AND) or any (OR)
Trait Implementations§
Source§impl Clone for PromotionCondition
impl Clone for PromotionCondition
Source§fn clone(&self) -> PromotionCondition
fn clone(&self) -> PromotionCondition
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for PromotionCondition
impl Debug for PromotionCondition
Source§impl<'de> Deserialize<'de> for PromotionCondition
impl<'de> Deserialize<'de> for PromotionCondition
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<PromotionCondition, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<PromotionCondition, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Serialize for PromotionCondition
impl Serialize for PromotionCondition
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
Auto Trait Implementations§
impl Freeze for PromotionCondition
impl RefUnwindSafe for PromotionCondition
impl Send for PromotionCondition
impl Sync for PromotionCondition
impl Unpin for PromotionCondition
impl UnsafeUnpin for PromotionCondition
impl UnwindSafe for PromotionCondition
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