pub struct Condition {
pub operator: Operator,
pub key: String,
pub value: Value,
}
Expand description
Represents a single condition in an IAM policy
Fields§
§operator: Operator
The condition operator (e.g., StringEquals
, DateGreaterThan
)
key: String
The condition key (e.g., “aws:username”, “s3:prefix”)
value: Value
The condition value(s)
Implementations§
Source§impl Condition
impl Condition
Sourcepub fn new<K: Into<String>>(operator: Operator, key: K, value: Value) -> Self
pub fn new<K: Into<String>>(operator: Operator, key: K, value: Value) -> Self
Creates a new condition
Sourcepub fn string<K: Into<String>, V: Into<String>>(
operator: Operator,
key: K,
value: V,
) -> Self
pub fn string<K: Into<String>, V: Into<String>>( operator: Operator, key: K, value: V, ) -> Self
Creates a condition with a string value
Sourcepub fn boolean<K: Into<String>>(operator: Operator, key: K, value: bool) -> Self
pub fn boolean<K: Into<String>>(operator: Operator, key: K, value: bool) -> Self
Creates a condition with a boolean value
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Condition
impl<'de> Deserialize<'de> for Condition
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 Validate for Condition
impl Validate for Condition
Source§fn validate(&self, context: &mut ValidationContext) -> ValidationResult
fn validate(&self, context: &mut ValidationContext) -> ValidationResult
Validate the component within the given context Read more
Source§fn validate_result(&self) -> ValidationResult
fn validate_result(&self) -> ValidationResult
Validate with detailed errors (same as regular validation) Read more
impl Eq for Condition
impl StructuralPartialEq for Condition
Auto Trait Implementations§
impl Freeze for Condition
impl RefUnwindSafe for Condition
impl Send for Condition
impl Sync for Condition
impl Unpin for Condition
impl UnwindSafe for Condition
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