Enum aws_sdk_mailmanager::types::RuleCondition
source · #[non_exhaustive]pub enum RuleCondition {
BooleanExpression(RuleBooleanExpression),
DmarcExpression(RuleDmarcExpression),
IpExpression(RuleIpExpression),
NumberExpression(RuleNumberExpression),
StringExpression(RuleStringExpression),
VerdictExpression(RuleVerdictExpression),
Unknown,
}
Expand description
The conditional expression used to evaluate an email for determining if a rule action should be taken.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
BooleanExpression(RuleBooleanExpression)
The condition applies to a boolean expression passed in this field.
DmarcExpression(RuleDmarcExpression)
The condition applies to a DMARC policy expression passed in this field.
IpExpression(RuleIpExpression)
The condition applies to an IP address expression passed in this field.
NumberExpression(RuleNumberExpression)
The condition applies to a number expression passed in this field.
StringExpression(RuleStringExpression)
The condition applies to a string expression passed in this field.
VerdictExpression(RuleVerdictExpression)
The condition applies to a verdict expression passed in this field.
Unknown
The Unknown
variant represents cases where new union variant was received. Consider upgrading the SDK to the latest available version.
An unknown enum variant
Note: If you encounter this error, consider upgrading your SDK to the latest version.
The Unknown
variant represents cases where the server sent a value that wasn’t recognized
by the client. This can happen when the server adds new functionality, but the client has not been updated.
To investigate this, consider turning on debug logging to print the raw HTTP response.
Implementations§
source§impl RuleCondition
impl RuleCondition
sourcepub fn as_boolean_expression(&self) -> Result<&RuleBooleanExpression, &Self>
pub fn as_boolean_expression(&self) -> Result<&RuleBooleanExpression, &Self>
Tries to convert the enum instance into BooleanExpression
, extracting the inner RuleBooleanExpression
.
Returns Err(&Self)
if it can’t be converted.
sourcepub fn is_boolean_expression(&self) -> bool
pub fn is_boolean_expression(&self) -> bool
Returns true if this is a BooleanExpression
.
sourcepub fn as_dmarc_expression(&self) -> Result<&RuleDmarcExpression, &Self>
pub fn as_dmarc_expression(&self) -> Result<&RuleDmarcExpression, &Self>
Tries to convert the enum instance into DmarcExpression
, extracting the inner RuleDmarcExpression
.
Returns Err(&Self)
if it can’t be converted.
sourcepub fn is_dmarc_expression(&self) -> bool
pub fn is_dmarc_expression(&self) -> bool
Returns true if this is a DmarcExpression
.
sourcepub fn as_ip_expression(&self) -> Result<&RuleIpExpression, &Self>
pub fn as_ip_expression(&self) -> Result<&RuleIpExpression, &Self>
Tries to convert the enum instance into IpExpression
, extracting the inner RuleIpExpression
.
Returns Err(&Self)
if it can’t be converted.
sourcepub fn is_ip_expression(&self) -> bool
pub fn is_ip_expression(&self) -> bool
Returns true if this is a IpExpression
.
sourcepub fn as_number_expression(&self) -> Result<&RuleNumberExpression, &Self>
pub fn as_number_expression(&self) -> Result<&RuleNumberExpression, &Self>
Tries to convert the enum instance into NumberExpression
, extracting the inner RuleNumberExpression
.
Returns Err(&Self)
if it can’t be converted.
sourcepub fn is_number_expression(&self) -> bool
pub fn is_number_expression(&self) -> bool
Returns true if this is a NumberExpression
.
sourcepub fn as_string_expression(&self) -> Result<&RuleStringExpression, &Self>
pub fn as_string_expression(&self) -> Result<&RuleStringExpression, &Self>
Tries to convert the enum instance into StringExpression
, extracting the inner RuleStringExpression
.
Returns Err(&Self)
if it can’t be converted.
sourcepub fn is_string_expression(&self) -> bool
pub fn is_string_expression(&self) -> bool
Returns true if this is a StringExpression
.
sourcepub fn as_verdict_expression(&self) -> Result<&RuleVerdictExpression, &Self>
pub fn as_verdict_expression(&self) -> Result<&RuleVerdictExpression, &Self>
Tries to convert the enum instance into VerdictExpression
, extracting the inner RuleVerdictExpression
.
Returns Err(&Self)
if it can’t be converted.
sourcepub fn is_verdict_expression(&self) -> bool
pub fn is_verdict_expression(&self) -> bool
Returns true if this is a VerdictExpression
.
sourcepub fn is_unknown(&self) -> bool
pub fn is_unknown(&self) -> bool
Returns true if the enum instance is the Unknown
variant.
Trait Implementations§
source§impl Clone for RuleCondition
impl Clone for RuleCondition
source§fn clone(&self) -> RuleCondition
fn clone(&self) -> RuleCondition
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for RuleCondition
impl Debug for RuleCondition
source§impl PartialEq for RuleCondition
impl PartialEq for RuleCondition
source§fn eq(&self, other: &RuleCondition) -> bool
fn eq(&self, other: &RuleCondition) -> bool
self
and other
values to be equal, and is used
by ==
.impl StructuralPartialEq for RuleCondition
Auto Trait Implementations§
impl Freeze for RuleCondition
impl RefUnwindSafe for RuleCondition
impl Send for RuleCondition
impl Sync for RuleCondition
impl Unpin for RuleCondition
impl UnwindSafe for RuleCondition
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> 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 more