[−][src]Struct coral::Message
A message output by cargo
Fields
message: String
code: Option<Code>
level: Level
spans: Option<Vec<Span>>
children: Option<Vec<Message>>
rendered: Option<String>
Methods
impl Message
[src]
pub fn is_warning(&self) -> bool
[src]
Check if the level is a warning
pub fn is_error(&self) -> bool
[src]
Check if the level is an error
pub fn is_note(&self) -> bool
[src]
Check if the level is a note
pub fn is_help(&self) -> bool
[src]
Check if the level is a help
pub fn report_headers(color: bool) -> String
[src]
Get a string containing the column headers for reports
pub fn report(&self, color: bool, terminal_width: usize) -> Option<String>
[src]
Get the message as a compact report
pub fn replacement_span(&self) -> Option<&Span>
[src]
Find a Span
that contains a suggested replacement
pub fn unroll(&self) -> impl Iterator<Item = &Message>
[src]
Get an iterator over this message and it's children
Trait Implementations
impl Clone for Message
[src]
fn clone(&self) -> Message
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl PartialEq<Message> for Message
[src]
impl Eq for Message
[src]
impl Debug for Message
[src]
impl Serialize for Message
[src]
fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error> where
__S: Serializer,
[src]
__S: Serializer,
impl<'de> Deserialize<'de> for Message
[src]
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]
__D: Deserializer<'de>,
Auto Trait Implementations
impl Unpin for Message
impl Sync for Message
impl Send for Message
impl UnwindSafe for Message
impl RefUnwindSafe for Message
Blanket Implementations
impl<T> From<T> for T
[src]
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut 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<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> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> DeserializeOwned for T where
T: Deserialize<'de>,
[src]
T: Deserialize<'de>,