pub struct Code {
pub name: &'static str,
pub severity: Severity,
pub level: u8,
pub summary: &'static str,
}Expand description
A kind of diagnostic: its stable name, severity, level and one sentence. Codes are the contract a consumer switches on; messages are not.
Fields§
§name: &'static strlayer.name, such as shape.unknown_field.
severity: SeverityThe severity of every diagnostic of this code.
level: u81 for a fact the rules state, 2 for a heuristic, 3 for a reviewer’s finding.
summary: &'static strWhat the code means, in one sentence.
Implementations§
Trait Implementations§
impl Eq for Code
impl StructuralPartialEq for Code
Auto Trait Implementations§
impl Forget for Code
impl Freeze for Code
impl Move for Code
impl RefUnwindSafe for Code
impl Send for Code
impl Sync for Code
impl Unpin for Code
impl UnsafeUnpin for Codewhere
&'static str: UnsafeUnpin,
impl UnwindSafe for Codewhere
&'static str: UnwindSafe,
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