pub struct CompilerMessage { /* private fields */ }
Expand description
Describes the location and nature of a compiler message.
Implementations§
Source§impl 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 Freeze for CompilerMessage
impl RefUnwindSafe for CompilerMessage
impl Send for CompilerMessage
impl Sync for CompilerMessage
impl Unpin for CompilerMessage
impl UnwindSafe for CompilerMessage
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more