pub struct Suppression {
pub kind: SuppressionKind,
pub rules: Vec<String>,
pub raw_range: Range<usize>,
}Expand description
One inline suppression directive parsed from a Markdown HTML comment.
Lint suppression comments recognised by the document parser.
The comment must live on its own source line with up to three spaces of leading indentation.
Recognised forms:
<!-- mdwright: allow rule-a[, rule-b] -->: silences the listed rules on the next block.<!-- mdwright: allow-next-line rule-a[, rule-b] -->: silences on the immediately following source line.<!-- mdwright: disable [rule-a, ...] -->: opens a region ending at the matchingenable(or end of file). An empty rule list means every known rule.<!-- mdwright: enable [rule-a, ...] -->: closes a region.<!-- mdwright: disable-all -->/<!-- mdwright: enable-all -->convenience aliases fordisable/enablewith no names.
Fields§
§kind: SuppressionKind§rules: Vec<String>Rule names parsed from the comment body. Empty for the bare
disable / enable forms and for disable-all / enable-all;
the suppression map expands empty to “every known rule”.
raw_range: Range<usize>Trait Implementations§
Source§impl Clone for Suppression
impl Clone for Suppression
Source§fn clone(&self) -> Suppression
fn clone(&self) -> Suppression
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 moreAuto Trait Implementations§
impl Freeze for Suppression
impl RefUnwindSafe for Suppression
impl Send for Suppression
impl Sync for Suppression
impl Unpin for Suppression
impl UnsafeUnpin for Suppression
impl UnwindSafe for Suppression
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