pub enum DisableScope {
Line(usize),
Block(usize),
File,
}Expand description
The lines an inline disable comment can suppress a finding on.
Variants§
Line(usize)
Exactly this 1-indexed line
Block(usize)
The lines below this 1-indexed one, up to the end of the document
File
Every line of the document
Implementations§
Source§impl DisableScope
impl DisableScope
Sourcepub fn carries(self, layer: DisableLayer, line: usize) -> bool
pub fn carries(self, layer: DisableLayer, line: usize) -> bool
Whether this comment is one of those keeping a rule off at line, given the
layer that answered for it there.
Answering for a line credits every comment of that layer reaching it, so no comment loses its credit to another. A comment left uncredited is one whose every line is spoken for by a layer it is not in, and removing it therefore changes nothing the run reports.
A block disable is treated as reaching the end of the document even when a
later enable closes it. Crediting a comment for more than it holds can only
leave a stale comment unreported.
Trait Implementations§
Source§impl Clone for DisableScope
impl Clone for DisableScope
Source§fn clone(&self) -> DisableScope
fn clone(&self) -> DisableScope
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for DisableScope
Source§impl Debug for DisableScope
impl Debug for DisableScope
impl Eq for DisableScope
Source§impl PartialEq for DisableScope
impl PartialEq for DisableScope
impl StructuralPartialEq for DisableScope
Auto Trait Implementations§
impl Freeze for DisableScope
impl RefUnwindSafe for DisableScope
impl Send for DisableScope
impl Sync for DisableScope
impl Unpin for DisableScope
impl UnsafeUnpin for DisableScope
impl UnwindSafe for DisableScope
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.