pub struct Diagnostics { /* private fields */ }Expand description
A collected sink of Diagnostics accumulated during a checked call.
Implementations§
Source§impl Diagnostics
impl Diagnostics
Sourcepub fn push(&mut self, message: impl Into<String>)
pub fn push(&mut self, message: impl Into<String>)
Pushes an error-level diagnostic from a message.
Sourcepub fn push_diagnostic(&mut self, diagnostic: Diagnostic)
pub fn push_diagnostic(&mut self, diagnostic: Diagnostic)
Pushes an already-built diagnostic.
Sourcepub fn push_info(&mut self, message: impl Into<String>)
pub fn push_info(&mut self, message: impl Into<String>)
Pushes an info-level diagnostic from a message.
Sourcepub fn messages(&self) -> &[Diagnostic]
pub fn messages(&self) -> &[Diagnostic]
Returns the accumulated diagnostics.
Sourcepub fn take(&mut self) -> Vec<Diagnostic>
pub fn take(&mut self) -> Vec<Diagnostic>
Drains and returns the accumulated diagnostics.
Trait Implementations§
Source§impl Clone for Diagnostics
impl Clone for Diagnostics
Source§fn clone(&self) -> Diagnostics
fn clone(&self) -> Diagnostics
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for Diagnostics
impl Debug for Diagnostics
Source§impl Default for Diagnostics
impl Default for Diagnostics
Source§fn default() -> Diagnostics
fn default() -> Diagnostics
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for Diagnostics
impl RefUnwindSafe for Diagnostics
impl Send for Diagnostics
impl Sync for Diagnostics
impl Unpin for Diagnostics
impl UnsafeUnpin for Diagnostics
impl UnwindSafe for Diagnostics
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