[−][src]Struct rslint_parser::ErrorBuilder
A builder for generating codespan diagnostics
Fields
inner: ParserError
file_id: usize
Implementations
impl ErrorBuilder
[src]
pub fn error(file_id: usize, message: &str) -> Self
[src]
Make a new builder with error severity
pub fn warning(file_id: usize, message: &str) -> Self
[src]
pub fn new(file_id: usize, diagnostic: Diagnostic) -> Self
[src]
Make a new builder with a predefined diagnostic
pub fn severity(self, severity: Severity) -> Self
[src]
Change the severity of this diagnostic
pub fn primary(
self,
range: impl Into<Range<usize>>,
message: impl Into<String>
) -> Self
[src]
self,
range: impl Into<Range<usize>>,
message: impl Into<String>
) -> Self
Add a primary label to the diagnostic
pub fn secondary(
self,
range: impl Into<Range<usize>>,
message: impl Into<String>
) -> Self
[src]
self,
range: impl Into<Range<usize>>,
message: impl Into<String>
) -> Self
Add a secondary label to this diagnostic
pub fn help(self, message: &str) -> Self
[src]
Add a help message to the bottom of the diagnostic, that is prefixed by a "help:".
pub fn note(self, message: &str) -> Self
[src]
Add a help message to the bottom of the diagnostic, that is prefixed by a "note:".
pub fn end(self) -> Diagnostic
[src]
Consume the builder and return its diagnostic
Trait Implementations
impl From<ErrorBuilder> for Diagnostic
[src]
fn from(builder: ErrorBuilder) -> Diagnostic
[src]
Auto Trait Implementations
impl RefUnwindSafe for ErrorBuilder
impl Send for ErrorBuilder
impl Sync for ErrorBuilder
impl Unpin for ErrorBuilder
impl UnwindSafe for ErrorBuilder
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> 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, 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>,