pub struct Diagnostics { /* private fields */ }Expand description
The diagnostics collected so far.
Implementations§
Source§impl Diagnostics
impl Diagnostics
pub fn new() -> Self
Sourcepub fn push(&mut self, d: Diagnostic)
pub fn push(&mut self, d: Diagnostic)
Records and logs a diagnostic.
Sourcepub fn push_quiet(&mut self, d: Diagnostic)
pub fn push_quiet(&mut self, d: Diagnostic)
Records a diagnostic already logged (moved between lists).
Sourcepub fn warn(
&mut self,
code: &'static str,
owner: Option<&OwnerId>,
subject: impl Into<String>,
message: impl Into<String>,
)
pub fn warn( &mut self, code: &'static str, owner: Option<&OwnerId>, subject: impl Into<String>, message: impl Into<String>, )
Records a warning.
Sourcepub fn error(
&mut self,
code: &'static str,
owner: Option<&OwnerId>,
subject: impl Into<String>,
message: impl Into<String>,
)
pub fn error( &mut self, code: &'static str, owner: Option<&OwnerId>, subject: impl Into<String>, message: impl Into<String>, )
Records an error.
pub fn all(&self) -> &[Diagnostic]
pub fn is_empty(&self) -> bool
pub fn len(&self) -> usize
Sourcepub fn take(&mut self) -> Vec<Diagnostic>
pub fn take(&mut self) -> Vec<Diagnostic>
Takes every diagnostic out.
Sourcepub fn remove_owner(&mut self, owner: &OwnerId)
pub fn remove_owner(&mut self, owner: &OwnerId)
Forgets the diagnostics of one owner (it was removed).
Sourcepub fn extend(&mut self, other: impl IntoIterator<Item = Diagnostic>)
pub fn extend(&mut self, other: impl IntoIterator<Item = Diagnostic>)
Records diagnostics already logged.
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 · 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