pub struct PatternCoverageExt {
pub arm_count: usize,
pub has_wildcard: bool,
}Expand description
A pattern coverage checker (simplified).
Fields§
§arm_count: usizeNumber of arms
has_wildcard: boolWhether a wildcard arm is present
Implementations§
Source§impl PatternCoverageExt
impl PatternCoverageExt
Sourcepub fn add_arm(&mut self, tag: PatternTagExt)
pub fn add_arm(&mut self, tag: PatternTagExt)
Add an arm.
Sourcepub fn is_complete(&self) -> bool
pub fn is_complete(&self) -> bool
Returns true if coverage is trivially complete (has a wildcard).
Trait Implementations§
Auto Trait Implementations§
impl Freeze for PatternCoverageExt
impl RefUnwindSafe for PatternCoverageExt
impl Send for PatternCoverageExt
impl Sync for PatternCoverageExt
impl Unpin for PatternCoverageExt
impl UnsafeUnpin for PatternCoverageExt
impl UnwindSafe for PatternCoverageExt
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