pub struct DiagnosticCode { /* private fields */ }Expand description
Stable, severity-free diagnostic identifier (manifest §16).
Rendered as a namespace followed by a zero-padded four-digit number,
e.g. MOS0010. Equality and hashing use the (namespace, number)
pair, so the display width can grow past four digits without breaking
tooling that keyed off the structured value.
§Examples
use mos_core::codes;
assert_eq!(codes::MOS0010.code().to_string(), "MOS0010");
assert_eq!(codes::MOS0010.code().number(), 10);Implementations§
Trait Implementations§
Source§impl Clone for DiagnosticCode
impl Clone for DiagnosticCode
Source§fn clone(&self) -> DiagnosticCode
fn clone(&self) -> DiagnosticCode
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 DiagnosticCode
impl Debug for DiagnosticCode
Source§impl Display for DiagnosticCode
impl Display for DiagnosticCode
Source§impl Hash for DiagnosticCode
impl Hash for DiagnosticCode
Source§impl Ord for DiagnosticCode
impl Ord for DiagnosticCode
Source§fn cmp(&self, other: &DiagnosticCode) -> Ordering
fn cmp(&self, other: &DiagnosticCode) -> Ordering
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for DiagnosticCode
impl PartialEq for DiagnosticCode
Source§fn eq(&self, other: &DiagnosticCode) -> bool
fn eq(&self, other: &DiagnosticCode) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl PartialOrd for DiagnosticCode
impl PartialOrd for DiagnosticCode
impl Copy for DiagnosticCode
impl Eq for DiagnosticCode
impl StructuralPartialEq for DiagnosticCode
Auto Trait Implementations§
impl Freeze for DiagnosticCode
impl RefUnwindSafe for DiagnosticCode
impl Send for DiagnosticCode
impl Sync for DiagnosticCode
impl Unpin for DiagnosticCode
impl UnsafeUnpin for DiagnosticCode
impl UnwindSafe for DiagnosticCode
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