pub enum Condition {
Success,
Contains {
path: String,
value: String,
},
Matches {
path: String,
pattern: String,
},
And {
conditions: Vec<Condition>,
},
Or {
conditions: Vec<Condition>,
},
}Expand description
Condition for control flow in tool expressions
Conditions are used in Choice expressions to determine which branch to execute.
Variants§
Success
Check if the result was successful
Contains
Check if JSON path contains a specific value
Fields
Matches
Check if value at JSON path matches a regex pattern
And
All conditions must be true
Or
At least one condition must be true
Implementations§
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
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 UnsafeUnpin 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