[][src]Struct codemap_diagnostic::Emitter

pub struct Emitter<'a> { /* fields omitted */ }

Formats and prints diagnostic messages.

Methods

impl<'a> Emitter<'a>[src]

pub fn stderr(
    color_config: ColorConfig,
    code_map: Option<&'a CodeMap>
) -> Emitter<'a>
[src]

Creates an emitter wrapping stderr.

pub fn vec(vec: &'a mut Vec<u8>, code_map: Option<&'a CodeMap>) -> Emitter<'a>[src]

Creates an emitter wrapping a vector.

pub fn new(
    dst: Box<dyn Write + Send + 'a>,
    code_map: Option<&'a CodeMap>
) -> Emitter<'a>
[src]

Creates an emitter wrapping a boxed Write trait object.

pub fn emit(&mut self, msgs: &[Diagnostic])[src]

Print a group of diagnostic messages.

The messages within a group are printed atomically without spacing between them, and share consistent formatting elements, such as aligned line number width.

Auto Trait Implementations

impl<'a> Send for Emitter<'a>

impl<'a> !Sync for Emitter<'a>

Blanket Implementations

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

impl<T> From for T[src]

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

type Error = !

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

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

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

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

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

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

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