pub struct InvariantLibrary {
pub categories: BTreeMap<String, Vec<Invariant>>,
}Expand description
A collection of invariants organized by category.
Fields§
§categories: BTreeMap<String, Vec<Invariant>>Invariants by category.
Implementations§
Source§impl InvariantLibrary
impl InvariantLibrary
Sourcepub fn with_defaults(chain: &str) -> Self
pub fn with_defaults(chain: &str) -> Self
Create a library with default built-in invariants for a chain.
Sourcepub fn get_category(&self, category: &str) -> Option<&[Invariant]>
pub fn get_category(&self, category: &str) -> Option<&[Invariant]>
Get all invariants in a category.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for InvariantLibrary
impl RefUnwindSafe for InvariantLibrary
impl Send for InvariantLibrary
impl Sync for InvariantLibrary
impl Unpin for InvariantLibrary
impl UnsafeUnpin for InvariantLibrary
impl UnwindSafe for InvariantLibrary
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