pub enum Assertion {
    EntityExists {
        component_types: Vec<String>,
        count: Option<usize>,
    },
    ComponentEquals {
        entity_id: Option<u64>,
        component_type: String,
        expected_value: Value,
    },
    ComponentMatches {
        entity_id: Option<u64>,
        component_type: String,
        predicate: Predicate,
    },
    PerformanceWithin {
        metric: PerformanceMetric,
        max_value: f64,
    },
    ActionSucceeds {
        action: Action,
    },
    All {
        assertions: Vec<Assertion>,
    },
    Any {
        assertions: Vec<Assertion>,
    },
    Not {
        assertion: Box<Assertion>,
    },
}Expand description
Testable assertion types
Variants§
EntityExists
Entity exists with specific components
ComponentEquals
Component has specific value
ComponentMatches
Component value matches predicate
PerformanceWithin
Performance metric is within bounds
ActionSucceeds
Action completes successfully
All
Composite assertion (all must pass)
Any
Composite assertion (any must pass)
Not
Negation of assertion
Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Assertion
 
impl<'de> Deserialize<'de> for Assertion
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
Auto Trait Implementations§
impl Freeze for Assertion
impl RefUnwindSafe for Assertion
impl Send for Assertion
impl Sync for Assertion
impl Unpin for Assertion
impl UnwindSafe for Assertion
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
Source§impl<T> CloneToUninit for Twhere
    T: Clone,
 
impl<T> CloneToUninit for Twhere
    T: Clone,
Source§impl<T> Instrument for T
 
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
 
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
 
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
 
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
 
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts 
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
 
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts 
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more