Enum Rule Copy item path Source pub enum Rule {
Show 14 variants AsciiOnly,
LineLength,
NoAnsi,
ErrorPrefix,
WarningPrefix,
ConfirmOnSet,
ListCountSummary,
LabelColonValue,
BooleanWords,
NoNakedPrint,
NoCursorMoves,
UnitsSpelledOut,
NoAdHocTimestamps,
StdoutStderrSeparation,
}Expand description An identifier for one of the 14 hard accessibility rules. Each
variant carries its own doc comment describing the specific
constraint the rule enforces.
R1: Every byte is ASCII printable (0x20–0x7E) or \n.
R2: Every line is ≤ 80 characters.
R3: No ANSI escape sequences.
R4: Error lines begin with Error:.
R5: Warning lines begin with Warning:.
R6: Mutating commands confirm success. (Covered by per-command unit tests; not a line-level rule.)
R7: Lists end with a count summary. (Covered by per-command unit tests.)
R8: Labels end with a colon before their values.
R9: Booleans render as on/off, never true/false or 1/0.
R10: No print! without a trailing newline. (Static grep rule.)
R11: No cursor-move sequences or spinners. (Static grep rule.)
R12: Numeric units spelled out (megahertz, watts, etc.).
R13: No ad-hoc [HH:MM:SS] timestamps. (Static grep rule.)
R14: User output to stdout, diagnostics to stderr. (Static grep rule.)
Short identifier used in error messages and the compliance
report: "R1", "R2", etc.
Human-readable summary of the rule, suitable for the report
printed by the check subcommand.
Performs copy-assignment from
source.
Read more Formats the value using the given formatter.
Read more Compares and returns the maximum of two values.
Read more Compares and returns the minimum of two values.
Read more Restrict a value to a certain interval.
Read more Tests for self and other values to be equal, and is used by ==.
Tests for !=. The default implementation is almost always sufficient,
and should not be overridden without very good reason.
This method returns an ordering between
self and
other values if one exists.
Read more Tests less than (for
self and
other) and is used by the
< operator.
Read more Tests less than or equal to (for
self and
other) and is used by the
<= operator.
Read more Tests greater than (for
self and
other) and is used by the
>
operator.
Read more Tests greater than or equal to (for
self and
other) and is used by
the
>= operator.
Read more Immutably borrows from an owned value.
Read more Mutably borrows from an owned value.
Read more 🔬 This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from
self to
dest.
Read more Returns the argument unchanged.
Instruments this type with the provided [
Span], returning an
Instrumented wrapper.
Read more Calls U::from(self).
That is, this conversion is whatever the implementation of
From <T> for U chooses to do.
The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning.
Read more Uses borrowed data to replace owned data, usually by cloning.
Read more The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.