Struct aws_sdk_mailmanager::types::Rule
source · #[non_exhaustive]pub struct Rule {
pub name: Option<String>,
pub conditions: Option<Vec<RuleCondition>>,
pub unless: Option<Vec<RuleCondition>>,
pub actions: Vec<RuleAction>,
}
Expand description
A rule contains conditions, "unless conditions" and actions. For each envelope recipient of an email, if all conditions match and none of the "unless conditions" match, then all of the actions are executed sequentially. If no conditions are provided, the rule always applies and the actions are implicitly executed. If only "unless conditions" are provided, the rule applies if the email does not match the evaluation of the "unless conditions".
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. }
syntax; cannot be matched against without a wildcard ..
; and struct update syntax will not work.name: Option<String>
The user-friendly name of the rule.
conditions: Option<Vec<RuleCondition>>
The conditions of this rule. All conditions must match the email for the actions to be executed. An empty list of conditions means that all emails match, but are still subject to any "unless conditions"
unless: Option<Vec<RuleCondition>>
The "unless conditions" of this rule. None of the conditions can match the email for the actions to be executed. If any of these conditions do match the email, then the actions are not executed.
actions: Vec<RuleAction>
The list of actions to execute when the conditions match the incoming email, and none of the "unless conditions" match.
Implementations§
source§impl Rule
impl Rule
sourcepub fn conditions(&self) -> &[RuleCondition]
pub fn conditions(&self) -> &[RuleCondition]
The conditions of this rule. All conditions must match the email for the actions to be executed. An empty list of conditions means that all emails match, but are still subject to any "unless conditions"
If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use .conditions.is_none()
.
sourcepub fn unless(&self) -> &[RuleCondition]
pub fn unless(&self) -> &[RuleCondition]
The "unless conditions" of this rule. None of the conditions can match the email for the actions to be executed. If any of these conditions do match the email, then the actions are not executed.
If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use .unless.is_none()
.
sourcepub fn actions(&self) -> &[RuleAction]
pub fn actions(&self) -> &[RuleAction]
The list of actions to execute when the conditions match the incoming email, and none of the "unless conditions" match.
Trait Implementations§
source§impl PartialEq for Rule
impl PartialEq for Rule
impl StructuralPartialEq for Rule
Auto Trait Implementations§
impl Freeze for Rule
impl RefUnwindSafe for Rule
impl Send for Rule
impl Sync for Rule
impl Unpin for Rule
impl UnwindSafe for Rule
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