[−][src]Struct rslint_core::DiagnosticBuilder
A simple builder for creating codespan diagnostics sequentially
Implementations
impl DiagnosticBuilder
[src]
pub fn error(
file_id: usize,
code: impl Into<String>,
message: impl Into<String>
) -> Self
[src]
file_id: usize,
code: impl Into<String>,
message: impl Into<String>
) -> Self
Create a new builder with a severity of error
pub fn warning(
file_id: usize,
code: impl Into<String>,
message: impl Into<String>
) -> Self
[src]
file_id: usize,
code: impl Into<String>,
message: impl Into<String>
) -> Self
Create a new builder with a severity of warning
pub fn note_diagnostic(
file_id: usize,
code: impl Into<String>,
message: impl Into<String>
) -> Self
[src]
file_id: usize,
code: impl Into<String>,
message: impl Into<String>
) -> Self
Create a new builder with a severity of note
pub fn severity(self, severity: Severity) -> Self
[src]
Change the severity of this diagnostic
pub fn primary(self, range: impl Span, message: impl AsRef<str>) -> Self
[src]
Add a primary label to the diagnostic
pub fn secondary(self, range: impl Span, message: impl AsRef<str>) -> Self
[src]
Add a secondary label to this diagnostic
pub fn note(self, message: impl AsRef<str>) -> Self
[src]
Add a note message to the bottom of the diagnostic (usually a Help:
or Note:
message)
pub fn finish(self) -> Diagnostic
[src]
Trait Implementations
impl Clone for DiagnosticBuilder
[src]
fn clone(&self) -> DiagnosticBuilder
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Debug for DiagnosticBuilder
[src]
impl From<DiagnosticBuilder> for Diagnostic
[src]
fn from(builder: DiagnosticBuilder) -> Diagnostic
[src]
impl From<DiagnosticBuilder> for RuleResult
[src]
fn from(builder: DiagnosticBuilder) -> RuleResult
[src]
impl From<DiagnosticBuilder> for Option<RuleResult>
[src]
fn from(builder: DiagnosticBuilder) -> Option<RuleResult>
[src]
Auto Trait Implementations
impl RefUnwindSafe for DiagnosticBuilder
impl Send for DiagnosticBuilder
impl Sync for DiagnosticBuilder
impl Unpin for DiagnosticBuilder
impl UnwindSafe for DiagnosticBuilder
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>,