pub struct InvariantChecker { /* private fields */ }Expand description
Invariant checker for game state validation during fuzzing
Implementations§
Source§impl InvariantChecker
impl InvariantChecker
Sourcepub fn add_check(&mut self, check: InvariantCheck)
pub fn add_check(&mut self, check: InvariantCheck)
Add an invariant check
Sourcepub fn record_violation(
&mut self,
invariant_name: &str,
message: &str,
step: u64,
)
pub fn record_violation( &mut self, invariant_name: &str, message: &str, step: u64, )
Record a violation
Sourcepub fn has_violations(&self) -> bool
pub fn has_violations(&self) -> bool
Check if any violations occurred
Sourcepub fn violations(&self) -> &[InvariantViolation]
pub fn violations(&self) -> &[InvariantViolation]
Get all violations
Sourcepub fn check_count(&self) -> usize
pub fn check_count(&self) -> usize
Get the number of checks
Sourcepub fn clear_violations(&mut self)
pub fn clear_violations(&mut self)
Clear all violations
Trait Implementations§
Source§impl Clone for InvariantChecker
impl Clone for InvariantChecker
Source§fn clone(&self) -> InvariantChecker
fn clone(&self) -> InvariantChecker
Returns a duplicate of the value. Read more
1.0.0 · 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 InvariantChecker
impl Debug for InvariantChecker
Source§impl Default for InvariantChecker
impl Default for InvariantChecker
Source§fn default() -> InvariantChecker
fn default() -> InvariantChecker
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for InvariantChecker
impl RefUnwindSafe for InvariantChecker
impl Send for InvariantChecker
impl Sync for InvariantChecker
impl Unpin for InvariantChecker
impl UnsafeUnpin for InvariantChecker
impl UnwindSafe for InvariantChecker
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