pub trait MessageBase {
    fn message_title(&self) -> Cow<'_, str>;
    fn main_annotation(&self) -> Annotation<'_>;

    fn message_type(&self) -> AnnotationType { ... }
    fn additional_annotations<'a, T: Extend<Annotation<'a>>>(
        &'a self,
        results: &mut T
    ) { ... } }
Expand description

Helper for constructing a Message

Thanks to the blanket implementation impl<'a, T: MessageBase> From<&'a T> for Message<'a>, implementors of this trait can be converted to a message for free.

Required Methods

Returns the main caption of the message.

Returns an annotation to be the first in the message.

Provided Methods

Returns the type of the entire message.

The default implementation returns AnnotationType::Error.

Adds additional annotations to the given container.

The default implementation does nothing.

Implementors