pub struct InvariantGuard { /* private fields */ }Expand description
Enforces the Resonance Architecture’s 8 canonical invariants
Implementations§
Source§impl InvariantGuard
impl InvariantGuard
pub fn new(config: &InvariantConfig) -> Self
Sourcepub fn check(
&self,
operation: &Operation,
state: &SystemState,
) -> Result<(), InvariantViolation>
pub fn check( &self, operation: &Operation, state: &SystemState, ) -> Result<(), InvariantViolation>
Check all invariants before an operation
Sourcepub fn enabled_invariants(&self) -> &[ArchitecturalInvariant]
pub fn enabled_invariants(&self) -> &[ArchitecturalInvariant]
Get list of enabled invariants
Auto Trait Implementations§
impl Freeze for InvariantGuard
impl RefUnwindSafe for InvariantGuard
impl Send for InvariantGuard
impl Sync for InvariantGuard
impl Unpin for InvariantGuard
impl UnwindSafe for InvariantGuard
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