[−][src]Struct rslint_core::RuleCtx
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.
Implementations
impl RuleCtx
[src]
pub fn err(
&mut self,
code: impl AsRef<str>,
message: impl AsRef<str>
) -> DiagnosticBuilder
[src]
&mut self,
code: impl AsRef<str>,
message: impl AsRef<str>
) -> DiagnosticBuilder
Make a new diagnostic builder.
pub fn add_err(&mut self, diagnostic: impl Into<Diagnostic>)
[src]
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for RuleCtx
impl Send for RuleCtx
impl Sync for RuleCtx
impl Unpin for RuleCtx
impl UnwindSafe for RuleCtx
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> DynClone for T where
T: Clone,
[src]
T: Clone,
impl<T> Erasable for T
unsafe fn unerase(this: NonNull<Erased>) -> NonNull<T>
const ACK_1_1_0: bool
fn erase(this: NonNull<Self>) -> NonNull<Erased>
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,