pub struct Diagnostics(/* private fields */);Expand description
A collection of diagnostics, returned whole rather than one at a time.
Implementations§
Source§impl Diagnostics
impl Diagnostics
pub fn new() -> Self
pub fn push(&mut self, d: Diagnostic)
pub fn extend(&mut self, other: Diagnostics)
pub fn iter(&self) -> impl Iterator<Item = &Diagnostic>
pub fn errors(&self) -> impl Iterator<Item = &Diagnostic>
pub fn has_errors(&self) -> bool
pub fn len(&self) -> usize
pub fn is_empty(&self) -> bool
Sourcepub fn into_errors(self) -> Vec<Diagnostic>
pub fn into_errors(self) -> Vec<Diagnostic>
Drops warnings and notes, keeping only errors.
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
Source§impl Display for Diagnostics
impl Display for Diagnostics
impl Eq for Diagnostics
Source§impl Error for Diagnostics
impl Error for Diagnostics
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0:
use the Display impl or to_string()
Source§impl FromIterator<Diagnostic> for Diagnostics
impl FromIterator<Diagnostic> for Diagnostics
Source§fn from_iter<T: IntoIterator<Item = Diagnostic>>(iter: T) -> Self
fn from_iter<T: IntoIterator<Item = Diagnostic>>(iter: T) -> Self
Creates a value from an iterator. Read more
Source§impl IntoIterator for Diagnostics
impl IntoIterator for Diagnostics
Source§impl PartialEq for Diagnostics
impl PartialEq for Diagnostics
Source§fn eq(&self, other: &Diagnostics) -> bool
fn eq(&self, other: &Diagnostics) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for Diagnostics
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