Skip to main content

ErrorCode

Enum ErrorCode 

Source
pub enum ErrorCode {
Show 38 variants P001, P002, P003, P004, P005, P006, P007, P008, P009, P010, U001, U002, U003, U004, U005, U006, U007, L001, L002, L003, L004, L005, L006, L007, L008, I001, I002, I003, I004, I005, C001, C002, C003, E001, E002, E003, E004, X001,
}
Expand description

One variant per catalogue entry, one-to-one with docs/07.

Variants§

§

P001

Syntax error in the pattern for the chosen dialect

§

P002

Unknown dialect name

§

P003

Flag not valid for the dialect, or conflicting flags

§

P004

Invalid escape sequence for the dialect

§

P005

Invalid quantifier (nothing to repeat, reversed bounds, bound out of range)

§

P006

Invalid character class (empty or reversed range, unknown class name)

§

P007

Unbalanced group or class

§

P008

Unknown Unicode property or script for the pinned Unicode version

§

P009

Invalid group name or duplicate name where the dialect forbids it

§

P010

Invalid /body/flags literal

§

U001

Backreference (language is not regular)

§

U002

Recursion or subroutine call

§

U003

Conditional group

§

U004

Atomic group or possessive quantifier (changes matching semantics, not only the language)

§

U005

Lookaround form outside the restrictions

§

U006

Callout or embedded code

§

U007

Dialect feature recognised but not yet supported

§

L001

State limit reached

§

L002

Time limit reached

§

L003

Memory limit reached

§

L004

Repetition expansion limit reached

§

L005

Pattern too long

§

L006

Nesting too deep

§

L007

Enumeration limit reached (witness or difference synthesis)

§

L008

Synthesised pattern size cap reached

§

I001

File not found or unreadable

§

I002

Input is not valid UTF-8 where text is required

§

I003

Not a git repository or unknown revision

§

I004

Reference engine required but unavailable

§

I005

Unknown source language for extraction

§

C001

Malformed configuration file

§

C002

Ignore entry without a reason

§

C003

Unknown option or value in configuration

§

E001

Certificate rejected by the independent checker

§

E002

Counterexample rejected by the independent matcher

§

E003

Reference engine disagrees with the verdict

§

E004

Certificate malformed or of an unknown version

§

X001

Internal invariant violated

Implementations§

Source§

impl ErrorCode

Source

pub const ALL: &'static [ErrorCode]

Every code, in catalogue order.

Source

pub const fn code(self) -> &'static str

The stable code string, e.g. RX-P001.

Source

pub const fn exit_code(self) -> u8

Process exit code for this error (docs/06 exit-code table).

Source

pub const fn meaning(self) -> &'static str

Human-readable meaning.

Source

pub const fn remedy(self) -> &'static str

Remedy shown to the user.

Trait Implementations§

Source§

impl Clone for ErrorCode

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Copy for ErrorCode

Source§

impl Debug for ErrorCode

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Display for ErrorCode

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Eq for ErrorCode

Source§

impl Hash for ErrorCode

Source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Source§

impl Ord for ErrorCode

Source§

fn cmp(&self, other: &Self) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 (const: unstable) · Source§

fn max(self, other: Self) -> Self
where Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 (const: unstable) · Source§

fn min(self, other: Self) -> Self
where Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 (const: unstable) · Source§

fn clamp(self, min: Self, max: Self) -> Self
where Self: Sized,

Restrict a value to a certain interval. Read more
Source§

fn clamp_to<R>(self, range: R) -> Self
where Self: Sized, R: ClampBounds<Self>,

🔬This is a nightly-only experimental API. (clamp_to)
Restrict a value to a certain range. Read more
Source§

impl PartialEq for ErrorCode

Source§

fn eq(&self, other: &Self) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl PartialOrd for ErrorCode

Source§

fn partial_cmp(&self, other: &Self) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 (const: unstable) · Source§

fn lt(&self, other: &Rhs) -> bool

Tests less than (for self and other) and is used by the < operator. Read more
1.0.0 (const: unstable) · Source§

fn le(&self, other: &Rhs) -> bool

Tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 (const: unstable) · Source§

fn gt(&self, other: &Rhs) -> bool

Tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 (const: unstable) · Source§

fn ge(&self, other: &Rhs) -> bool

Tests greater than or equal to (for self and other) and is used by the >= operator. Read more
Source§

impl StructuralPartialEq for ErrorCode

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.