pub struct EffectRowChecker {
pub declared_row: EffRow,
pub violations: Vec<String>,
}Expand description
A simple static effect row checker that verifies that performed effects are within the declared effect row.
Fields§
§declared_row: EffRowThe declared (allowed) effect row.
violations: Vec<String>Violations found during checking: effect names that were used but not declared.
Implementations§
Source§impl EffectRowChecker
impl EffectRowChecker
Sourcepub fn check_effect(&mut self, effect: &str) -> bool
pub fn check_effect(&mut self, effect: &str) -> bool
Check if the given effect is within the declared row.
Sourcepub fn check_all(&mut self, used_effects: &[&str]) -> bool
pub fn check_all(&mut self, used_effects: &[&str]) -> bool
Check all effects used in a list of operations.
Sourcepub fn has_violations(&self) -> bool
pub fn has_violations(&self) -> bool
Return whether any violations were found.
Sourcepub fn violation_summary(&self) -> String
pub fn violation_summary(&self) -> String
Return a summary of violations.
Sourcepub fn is_sound_annotation(&self) -> bool
pub fn is_sound_annotation(&self) -> bool
The declared effect row is a sound over-approximation of used effects.
Auto Trait Implementations§
impl Freeze for EffectRowChecker
impl RefUnwindSafe for EffectRowChecker
impl Send for EffectRowChecker
impl Sync for EffectRowChecker
impl Unpin for EffectRowChecker
impl UnsafeUnpin for EffectRowChecker
impl UnwindSafe for EffectRowChecker
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