Struct rant::compiler::CompilerMessage
source · [−]pub struct CompilerMessage { /* private fields */ }
Expand description
Describes the location and nature of a compiler message.
Implementations
sourceimpl CompilerMessage
impl CompilerMessage
sourcepub fn pos(&self) -> Option<Position>
pub fn pos(&self) -> Option<Position>
Gets the position in the source where the message was triggered.
sourcepub fn consume(self) -> (Option<Position>, Severity, Problem)
pub fn consume(self) -> (Option<Position>, Severity, Problem)
Consumes the CompilerMessage
and returns its position and info as a tuple.
sourcepub fn inline_message(&self) -> Option<String>
pub fn inline_message(&self) -> Option<String>
Gets the inline message text, usually used to annotate the span.
sourcepub fn is_warning(&self) -> bool
pub fn is_warning(&self) -> bool
Returns true if the message is a warning.
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
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more