pub enum ControlTierIdentity {
NotObserved,
Observed {
limits: ControlLimits,
},
}Expand description
Identity of a .gitignore control tier.
Variants§
NotObserved
No control file was read and no entry was classified, so the tier cannot say whether any entry is ignored.
Observed
Control files were read and admitted under limits.
Fields
§
limits: ControlLimitsThe budget and line limit that decided which control files apply.
Implementations§
Source§impl ControlTierIdentity
impl ControlTierIdentity
Sourcepub const fn is_observed(self) -> bool
pub const fn is_observed(self) -> bool
Whether the tier observed control state.
Sourcepub fn ignore_rules_fingerprint(self) -> u64
pub fn ignore_rules_fingerprint(self) -> u64
The ignore-rules fingerprint a ScanScope with this control tier carries.
Zero is reserved for Self::NotObserved, which is what
ScanScope::observes_controls tests. An observed tier hashes the control
semantics version and each limit in turn with FNV-1a and is never zero, so a scope
taken under one budget or line limit never matches one taken under another.
Trait Implementations§
Source§impl Clone for ControlTierIdentity
impl Clone for ControlTierIdentity
impl Copy for ControlTierIdentity
Source§impl Debug for ControlTierIdentity
impl Debug for ControlTierIdentity
impl Eq for ControlTierIdentity
Source§impl Hash for ControlTierIdentity
impl Hash for ControlTierIdentity
Source§impl PartialEq for ControlTierIdentity
impl PartialEq for ControlTierIdentity
impl StructuralPartialEq for ControlTierIdentity
Auto Trait Implementations§
impl Freeze for ControlTierIdentity
impl RefUnwindSafe for ControlTierIdentity
impl Send for ControlTierIdentity
impl Sync for ControlTierIdentity
impl Unpin for ControlTierIdentity
impl UnsafeUnpin for ControlTierIdentity
impl UnwindSafe for ControlTierIdentity
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