[−][src]Struct rant::compiler::CompilerMessage
Describes the location and nature of a compiler message.
Implementations
impl CompilerMessage
[src]
pub fn pos(&self) -> Option<Position>
[src]
Gets the position in the source where the message was triggered.
pub fn severity(&self) -> Severity
[src]
Gets the severity of the message.
pub fn info(&self) -> &Problem
[src]
Gets a reference to the problem variant triggering the message.
pub fn consume(self) -> (Option<Position>, Severity, Problem)
[src]
Consumes the CompilerMessage
and returns its position and info as a tuple.
pub fn code(&self) -> &'static str
[src]
Gets the message code associated with the message.
pub fn message(&self) -> String
[src]
Gets a message describing the error.
pub fn inline_message(&self) -> Option<String>
[src]
Gets the inline message text, usually used to annotate the span.
pub fn hint(&self) -> Option<String>
[src]
Gets the hint text associated with the message.
pub fn is_error(&self) -> bool
[src]
Returns true if the message is an error.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for CompilerMessage
impl Send for CompilerMessage
impl Sync for CompilerMessage
impl Unpin for CompilerMessage
impl UnwindSafe for CompilerMessage
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> 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>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,