#[non_exhaustive]pub struct ComponentConditionProperty {
pub property: Option<String>,
pub field: Option<String>,
pub operator: Option<String>,
pub operand: Option<String>,
pub then: Option<Box<ComponentProperty>>,
pub else: Option<Box<ComponentProperty>>,
pub operand_type: Option<String>,
}Expand description
Represents a conditional expression to set a component property. Use ComponentConditionProperty to set a property to different values conditionally, based on the value of another property.
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.property: Option<String>The name of the conditional property.
field: Option<String>The name of a field. Specify this when the property is a data model.
operator: Option<String>The operator to use to perform the evaluation, such as eq to represent equals.
operand: Option<String>The value of the property to evaluate.
then: Option<Box<ComponentProperty>>The value to assign to the property if the condition is met.
else: Option<Box<ComponentProperty>>The value to assign to the property if the condition is not met.
operand_type: Option<String>The type of the property to evaluate.
Implementations§
source§impl ComponentConditionProperty
impl ComponentConditionProperty
sourcepub fn field(&self) -> Option<&str>
pub fn field(&self) -> Option<&str>
The name of a field. Specify this when the property is a data model.
sourcepub fn operator(&self) -> Option<&str>
pub fn operator(&self) -> Option<&str>
The operator to use to perform the evaluation, such as eq to represent equals.
sourcepub fn then(&self) -> Option<&ComponentProperty>
pub fn then(&self) -> Option<&ComponentProperty>
The value to assign to the property if the condition is met.
sourcepub fn else(&self) -> Option<&ComponentProperty>
pub fn else(&self) -> Option<&ComponentProperty>
The value to assign to the property if the condition is not met.
sourcepub fn operand_type(&self) -> Option<&str>
pub fn operand_type(&self) -> Option<&str>
The type of the property to evaluate.
source§impl ComponentConditionProperty
impl ComponentConditionProperty
sourcepub fn builder() -> ComponentConditionPropertyBuilder
pub fn builder() -> ComponentConditionPropertyBuilder
Creates a new builder-style object to manufacture ComponentConditionProperty.
Trait Implementations§
source§impl Clone for ComponentConditionProperty
impl Clone for ComponentConditionProperty
source§fn clone(&self) -> ComponentConditionProperty
fn clone(&self) -> ComponentConditionProperty
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moresource§impl Debug for ComponentConditionProperty
impl Debug for ComponentConditionProperty
source§impl PartialEq for ComponentConditionProperty
impl PartialEq for ComponentConditionProperty
source§fn eq(&self, other: &ComponentConditionProperty) -> bool
fn eq(&self, other: &ComponentConditionProperty) -> bool
self and other values to be equal, and is used
by ==.impl StructuralPartialEq for ComponentConditionProperty
Auto Trait Implementations§
impl Freeze for ComponentConditionProperty
impl RefUnwindSafe for ComponentConditionProperty
impl Send for ComponentConditionProperty
impl Sync for ComponentConditionProperty
impl Unpin for ComponentConditionProperty
impl UnwindSafe for ComponentConditionProperty
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