pub struct InvariantSet { /* private fields */ }Expand description
A collection of invariants that must all pass.
Implementations§
Source§impl InvariantSet
impl InvariantSet
Sourcepub fn check_all(&self, context: &InvariantContext) -> Result<()>
pub fn check_all(&self, context: &InvariantContext) -> Result<()>
Check all invariants, collecting every violation.
Returns Ok(()) if all invariants pass, or Err with the first
blocking violation found.
Sourcepub fn check_all_collect(
&self,
context: &InvariantContext,
) -> Vec<InvariantViolation>
pub fn check_all_collect( &self, context: &InvariantContext, ) -> Vec<InvariantViolation>
Check all invariants and return all violations (does not short-circuit).
Trait Implementations§
Source§impl Debug for InvariantSet
impl Debug for InvariantSet
Auto Trait Implementations§
impl !RefUnwindSafe for InvariantSet
impl !Send for InvariantSet
impl !Sync for InvariantSet
impl !UnwindSafe for InvariantSet
impl Freeze for InvariantSet
impl Unpin for InvariantSet
impl UnsafeUnpin for InvariantSet
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