Struct codemap_diagnostic::Emitter
source · pub struct Emitter<'a> { /* private fields */ }
Expand description
Formats and prints diagnostic messages.
Implementations§
source§impl<'a> Emitter<'a>
impl<'a> Emitter<'a>
sourcepub fn stderr(
color_config: ColorConfig,
code_map: Option<&'a CodeMap>,
) -> Emitter<'a>
pub fn stderr( color_config: ColorConfig, code_map: Option<&'a CodeMap>, ) -> Emitter<'a>
Creates an emitter wrapping stderr.
sourcepub fn vec(vec: &'a mut Vec<u8>, code_map: Option<&'a CodeMap>) -> Emitter<'a>
pub fn vec(vec: &'a mut Vec<u8>, code_map: Option<&'a CodeMap>) -> Emitter<'a>
Creates an emitter wrapping a vector.
sourcepub fn new(
dst: Box<dyn Write + Send + 'a>,
code_map: Option<&'a CodeMap>,
) -> Emitter<'a>
pub fn new( dst: Box<dyn Write + Send + 'a>, code_map: Option<&'a CodeMap>, ) -> Emitter<'a>
Creates an emitter wrapping a boxed Write
trait object.
sourcepub fn emit(&mut self, msgs: &[Diagnostic])
pub fn emit(&mut self, msgs: &[Diagnostic])
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> !Freeze for Emitter<'a>
impl<'a> !RefUnwindSafe for Emitter<'a>
impl<'a> Send for Emitter<'a>
impl<'a> !Sync for Emitter<'a>
impl<'a> Unpin for Emitter<'a>
impl<'a> !UnwindSafe for Emitter<'a>
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