#[non_exhaustive]pub struct ConditionalSpecification {
pub active: bool,
pub conditional_branches: Vec<ConditionalBranch>,
pub default_branch: Option<DefaultConditionalBranch>,
}
Expand description
Provides a list of conditional branches. Branches are evaluated in the order that they are entered in the list. The first branch with a condition that evaluates to true is executed. The last branch in the list is the default branch. The default branch should not have any condition expression. The default branch is executed if no other branch has a matching condition.
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.active: bool
Determines whether a conditional branch is active. When active
is false, the conditions are not evaluated.
conditional_branches: Vec<ConditionalBranch>
A list of conditional branches. A conditional branch is made up of a condition, a response and a next step. The response and next step are executed when the condition is true.
default_branch: Option<DefaultConditionalBranch>
The conditional branch that should be followed when the conditions for other branches are not satisfied. A conditional branch is made up of a condition, a response and a next step.
Implementations§
source§impl ConditionalSpecification
impl ConditionalSpecification
sourcepub fn active(&self) -> bool
pub fn active(&self) -> bool
Determines whether a conditional branch is active. When active
is false, the conditions are not evaluated.
sourcepub fn conditional_branches(&self) -> &[ConditionalBranch]
pub fn conditional_branches(&self) -> &[ConditionalBranch]
A list of conditional branches. A conditional branch is made up of a condition, a response and a next step. The response and next step are executed when the condition is true.
sourcepub fn default_branch(&self) -> Option<&DefaultConditionalBranch>
pub fn default_branch(&self) -> Option<&DefaultConditionalBranch>
The conditional branch that should be followed when the conditions for other branches are not satisfied. A conditional branch is made up of a condition, a response and a next step.
source§impl ConditionalSpecification
impl ConditionalSpecification
sourcepub fn builder() -> ConditionalSpecificationBuilder
pub fn builder() -> ConditionalSpecificationBuilder
Creates a new builder-style object to manufacture ConditionalSpecification
.
Trait Implementations§
source§impl Clone for ConditionalSpecification
impl Clone for ConditionalSpecification
source§fn clone(&self) -> ConditionalSpecification
fn clone(&self) -> ConditionalSpecification
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for ConditionalSpecification
impl Debug for ConditionalSpecification
source§impl PartialEq for ConditionalSpecification
impl PartialEq for ConditionalSpecification
source§fn eq(&self, other: &ConditionalSpecification) -> bool
fn eq(&self, other: &ConditionalSpecification) -> bool
self
and other
values to be equal, and is used
by ==
.