pub struct CollectingDiagnosticSink { /* private fields */ }Expand description
Diagnostic sink that accumulates messages, usable without std.
Implementations§
Source§impl CollectingDiagnosticSink
impl CollectingDiagnosticSink
Sourcepub fn snapshot(&self) -> Vec<Diagnostic>
pub fn snapshot(&self) -> Vec<Diagnostic>
Returns a copy of all accumulated diagnostics without consuming them.
Sourcepub fn drain(&self) -> Vec<Diagnostic>
pub fn drain(&self) -> Vec<Diagnostic>
Removes and returns all accumulated diagnostics.
Trait Implementations§
Source§impl Debug for CollectingDiagnosticSink
impl Debug for CollectingDiagnosticSink
Source§impl Default for CollectingDiagnosticSink
impl Default for CollectingDiagnosticSink
Source§impl DiagnosticSink for CollectingDiagnosticSink
impl DiagnosticSink for CollectingDiagnosticSink
Source§fn emit(&self, diagnostic: Diagnostic)
fn emit(&self, diagnostic: Diagnostic)
Accepts and handles a single diagnostic message.
Auto Trait Implementations§
impl !Freeze for CollectingDiagnosticSink
impl !RefUnwindSafe for CollectingDiagnosticSink
impl !Sync for CollectingDiagnosticSink
impl Send for CollectingDiagnosticSink
impl Unpin for CollectingDiagnosticSink
impl UnsafeUnpin for CollectingDiagnosticSink
impl UnwindSafe for CollectingDiagnosticSink
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