pub enum ConditionValue {
Boolean(bool),
Number(i64),
String(String),
StringList(Vec<String>),
}
Expand description
Represents a condition value that can be a boolean, number, string, or list of strings
Variants§
Boolean(bool)
A boolean value (e.g., true
, false
)
Number(i64)
A numeric value (e.g., 42
, 3.14
)
String(String)
A single string value (e.g., "us-east-1"
)
StringList(Vec<String>)
Multiple string values (e.g., ["us-east-1", "us-west-2"]
)
Implementations§
Source§impl ConditionValue
impl ConditionValue
Sourcepub fn is_boolean(&self) -> bool
pub fn is_boolean(&self) -> bool
Returns true if this is a boolean value
Sourcepub fn is_string_list(&self) -> bool
pub fn is_string_list(&self) -> bool
Returns true if this is a string list value
Sourcepub fn is_array(&self) -> bool
pub fn is_array(&self) -> bool
Returns true if this value represents multiple items (i.e., is a list)
Sourcepub fn len(&self) -> usize
pub fn len(&self) -> usize
Returns the length of the value (1 for single values, list length for arrays)
Sourcepub fn to_json_value(&self) -> Value
pub fn to_json_value(&self) -> Value
Converts to a serde_json::Value
for backward compatibility
Sourcepub fn from_json_value(value: Value) -> Result<Self, String>
pub fn from_json_value(value: Value) -> Result<Self, String>
Creates a ConditionValue
from a serde_json::Value
Trait Implementations§
Source§impl Clone for ConditionValue
impl Clone for ConditionValue
Source§fn clone(&self) -> ConditionValue
fn clone(&self) -> ConditionValue
Returns a duplicate of the value. Read more
1.0.0 · 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 ConditionValue
impl Debug for ConditionValue
Source§impl<'de> Deserialize<'de> for ConditionValue
impl<'de> Deserialize<'de> for ConditionValue
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for ConditionValue
impl PartialEq for ConditionValue
Source§impl Serialize for ConditionValue
impl Serialize for ConditionValue
impl Eq for ConditionValue
impl StructuralPartialEq for ConditionValue
Auto Trait Implementations§
impl Freeze for ConditionValue
impl RefUnwindSafe for ConditionValue
impl Send for ConditionValue
impl Sync for ConditionValue
impl Unpin for ConditionValue
impl UnwindSafe for ConditionValue
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