pub struct IgnoredLints { /* private fields */ }
Expand description
A structure that keeps track of lints that have been ignored by users.
To use this structure, apply Self::remove_ignored
on the output of a
Linter
.
Implementations§
Source§impl IgnoredLints
impl IgnoredLints
pub fn new() -> Self
Sourcepub fn ignore_lint(&mut self, lint: &Lint, document: &Document)
pub fn ignore_lint(&mut self, lint: &Lint, document: &Document)
Add a lint to the list.
Sourcepub fn ignore_hash(&mut self, hash: u64)
pub fn ignore_hash(&mut self, hash: u64)
Add a context hash to the list of ignored lints.
pub fn is_ignored(&self, lint: &Lint, document: &Document) -> bool
Trait Implementations§
Source§impl Debug for IgnoredLints
impl Debug for IgnoredLints
Source§impl Default for IgnoredLints
impl Default for IgnoredLints
Source§fn default() -> IgnoredLints
fn default() -> IgnoredLints
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for IgnoredLints
impl<'de> Deserialize<'de> for IgnoredLints
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for IgnoredLints
impl RefUnwindSafe for IgnoredLints
impl Send for IgnoredLints
impl Sync for IgnoredLints
impl Unpin for IgnoredLints
impl UnwindSafe for IgnoredLints
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> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more