pub enum ExpBool {
And(Box<ExpBool>, Box<ExpBool>),
Equals(ExpPair),
FindInMap {
map_name: MapName,
top_level_key: Box<ExpString>,
second_level_key: String,
},
If {
condition_name: ConditionName,
true_branch: Box<ExpBool>,
else_branch: Box<ExpBool>,
},
Literal(bool),
Not(Box<ExpBool>),
Or(Vec<ExpBool>),
Select {
index: u8,
values: Vec<ExpBool>,
},
}Variants§
And(Box<ExpBool>, Box<ExpBool>)
Equals(ExpPair)
FindInMap
If
Literal(bool)
Not(Box<ExpBool>)
Or(Vec<ExpBool>)
Select
Trait Implementations§
Source§impl FnFindInMap for ExpBool
impl FnFindInMap for ExpBool
Source§impl ToValue for ExpBool
impl ToValue for ExpBool
Source§fn to_value(&self) -> Value
fn to_value(&self) -> Value
Literal
assert_eq!(
serde_json::Value::Bool(true),
ExpBool::Literal(true).to_value()
)
assert_eq!(
json!({"Fn::Equals":[{"Ref":"resource-a"},"some-literal"]}),
equals_string(
LogicalResourceName::from("resource-a"),
"some-literal"
).to_value()
);
assert_eq!(
json!({"Fn::Equals":[true,false]}),
equals_bool(
true,
false
).to_value()
)Auto Trait Implementations§
impl Freeze for ExpBool
impl RefUnwindSafe for ExpBool
impl Send for ExpBool
impl Sync for ExpBool
impl Unpin for ExpBool
impl UnwindSafe for ExpBool
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