pub struct DwCode { /* private fields */ }Expand description
A stable DW diagnostic code together with the exit tier it stops a run at
(ExitTier) and whose state its verdict is about (Subject).
A code is not a string that a check happens to quote; it is a rule with its
properties, and they travel with it to every site that raises it. Every
rule applies to every document the engine accepts (ADR-0024): there is one
dsl_version, so a code carries nothing about when it starts binding.
Implementations§
Source§impl DwCode
impl DwCode
Sourcepub const fn new(id: &'static str, tier: ExitTier) -> DwCode
pub const fn new(id: &'static str, tier: ExitTier) -> DwCode
A rule, with the tier it exits at — see ExitTier.
Sourcepub const fn about_the_engine(self) -> DwCode
pub const fn about_the_engine(self) -> DwCode
Mark this code an engine-property notice — see Subject::Engine
for the test to apply before choosing it. Chained onto the constructor,
because the two questions are independent: whose state is it about,
and what does it exit with.
Trait Implementations§
impl Copy for DwCode
impl Eq for DwCode
Source§impl Ord for DwCode
impl Ord for DwCode
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
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the minimum of two values. Read more
Source§impl PartialOrd for DwCode
impl PartialOrd for DwCode
impl StructuralPartialEq for DwCode
Auto Trait Implementations§
impl Freeze for DwCode
impl RefUnwindSafe for DwCode
impl Send for DwCode
impl Sync for DwCode
impl Unpin for DwCode
impl UnsafeUnpin for DwCode
impl UnwindSafe for DwCode
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