pub enum GatePredicate {
AlwaysTrue,
AlwaysFalse,
Equals(Value),
NotEquals(Value),
And(Vec<GatePredicate>),
Or(Vec<GatePredicate>),
Not(Box<GatePredicate>),
Threshold {
required: usize,
predicates: Vec<GatePredicate>,
},
}Expand description
Primitive Boolean Gate Predicate operating over arbitrary JSON or MCard state.
Variants§
AlwaysTrue
Always yields true.
AlwaysFalse
Always yields false.
Equals(Value)
Exact match with expected JSON value.
NotEquals(Value)
Inverted match with expected JSON value.
And(Vec<GatePredicate>)
Conjunction of child predicates (AND).
Or(Vec<GatePredicate>)
Disjunction of child predicates (OR).
Not(Box<GatePredicate>)
Negation of child predicate (NOT).
Threshold
M-of-N threshold evaluation.
Implementations§
Trait Implementations§
Source§impl Clone for GatePredicate
impl Clone for GatePredicate
Source§impl Debug for GatePredicate
impl Debug for GatePredicate
Source§impl<'de> Deserialize<'de> for GatePredicate
impl<'de> Deserialize<'de> for GatePredicate
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 GatePredicate
impl PartialEq for GatePredicate
Source§impl Serialize for GatePredicate
impl Serialize for GatePredicate
impl StructuralPartialEq for GatePredicate
Auto Trait Implementations§
impl Forget for GatePredicate
impl Freeze for GatePredicate
impl RefUnwindSafe for GatePredicate
impl Send for GatePredicate
impl Sync for GatePredicate
impl Unpin for GatePredicate
impl UnsafeUnpin for GatePredicate
impl UnwindSafe for GatePredicate
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