pub struct RuleCtx {
pub file_id: usize,
pub verbose: bool,
pub diagnostics: Vec<Diagnostic>,
pub fixer: Option<Fixer>,
pub src: Arc<str>,
}
Expand description
Context given to a rule when running it.
Fields§
§file_id: usize
The file id of the file being linted.
verbose: bool
Whether the linter is run with the --verbose
option.
Which dictates whether the linter should include more (potentially spammy) context in diagnostics.
diagnostics: Vec<Diagnostic>
An empty vector of diagnostics which the rule adds to.
fixer: Option<Fixer>
§src: Arc<str>
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl Freeze for RuleCtx
impl RefUnwindSafe for RuleCtx
impl Send for RuleCtx
impl Sync for RuleCtx
impl Unpin for RuleCtx
impl UnwindSafe for RuleCtx
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