#[non_exhaustive]pub enum AssertionCondition {
Equals,
NotEquals,
Contains,
GreaterThan,
LessThan,
Truthy,
Falsy,
Exists,
TypeIs,
}Expand description
Recognized assertion condition operators for evaluate_assertion.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Equals
Actual value must equal the expected value.
NotEquals
Actual value must not equal the expected value.
Contains
String must contain substring, or array must contain element.
GreaterThan
Numeric actual must be greater than expected.
LessThan
Numeric actual must be less than expected.
Truthy
Value must be truthy (non-null, non-false, non-empty, non-zero).
Falsy
Value must be falsy (null, false, empty string, zero).
Exists
Value must not be null.
TypeIs
Value must be of the specified JSON type (string, number, boolean, array, object, null).
Trait Implementations§
Source§impl Clone for AssertionCondition
impl Clone for AssertionCondition
Source§fn clone(&self) -> AssertionCondition
fn clone(&self) -> AssertionCondition
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 AssertionCondition
impl Debug for AssertionCondition
Source§impl<'de> Deserialize<'de> for AssertionCondition
impl<'de> Deserialize<'de> for AssertionCondition
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 Display for AssertionCondition
impl Display for AssertionCondition
Source§impl FromStr for AssertionCondition
impl FromStr for AssertionCondition
Source§impl JsonSchema for AssertionCondition
impl JsonSchema for AssertionCondition
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Returns a string that uniquely identifies the schema produced by this type. Read more
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Generates a JSON Schema for this type. Read more
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
Whether JSON Schemas generated for this type should be included directly in parent schemas,
rather than being re-used where possible using the
$ref keyword. Read moreSource§impl PartialEq for AssertionCondition
impl PartialEq for AssertionCondition
Source§fn eq(&self, other: &AssertionCondition) -> bool
fn eq(&self, other: &AssertionCondition) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for AssertionCondition
impl Serialize for AssertionCondition
impl Copy for AssertionCondition
impl Eq for AssertionCondition
impl StructuralPartialEq for AssertionCondition
Auto Trait Implementations§
impl Freeze for AssertionCondition
impl RefUnwindSafe for AssertionCondition
impl Send for AssertionCondition
impl Sync for AssertionCondition
impl Unpin for AssertionCondition
impl UnsafeUnpin for AssertionCondition
impl UnwindSafe for AssertionCondition
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