pub struct Rule {
pub id: RuleId,
pub severity: Severity,
pub summary: &'static str,
pub source: &'static str,
pub needs_context: bool,
}Expand description
One entry of the catalogue.
Fields§
§id: RuleIdIts stable identifier, which travels in ReceptionStatus.diagnostic_label.
severity: SeverityWhether breaking it makes a message invalid or merely suspect.
summary: &'static strWhat the rule checks.
source: &'static strWhere it comes from, quoted where the standard states it.
needs_context: boolWhether the rule needs more than the message in front of it.
Implementations§
Trait Implementations§
impl Copy for Rule
impl Eq for Rule
impl StructuralPartialEq for Rule
Auto Trait Implementations§
impl Forget for Rule
impl Freeze for Rule
impl RefUnwindSafe for Rule
impl Send for Rule
impl Sync for Rule
impl Unpin for Rule
impl UnsafeUnpin for Rule
impl UnwindSafe for Rule
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.