Struct rant::compiler::CompilerMessage[][src]

pub struct CompilerMessage { /* fields omitted */ }

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.

pub fn is_warning(&self) -> bool[src]

Returns true if the message is a warning.

Trait Implementations

impl Debug for CompilerMessage[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,