Skip to main content

Code

Enum Code 

Source
#[non_exhaustive]
pub enum Code {
Show 34 variants E0001, E0002, E0003, E0004, E0005, E0006, E0007, E0010, E0011, E0012, E0013, E0020, E0021, E0022, E0023, E0024, E0025, E0030, E0031, E0032, E0040, E0041, E0042, E0043, E0050, E0060, E0061, E0062, E0063, E0064, E0065, E0070, E0071, E0080,
}
Expand description

A diagnostic code from Appendix E.

Variants (Non-exhaustive)§

This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
§

E0001

Malformed timestamp.

§

E0002

Unknown profile tag.

§

E0003

Mixed text forms in one string (Rule D).

§

E0004

Group value out of range (> 3124).

§

E0005

Invalid base-5 digit.

§

E0006

Non-contiguous tier sequence.

§

E0007

Calendar rendering without a kind/id qualifier (§6.6).

§

E0010

Locale table load failure.

§

E0011

Duplicate name in the active locale table (Rule N).

§

E0012

Unknown key in an HJSON data file.

§

E0013

Profile lacks a datum_provenance record (Rule Q.4).

§

E0020

Result precedes the datum (Rule Z).

§

E0021

Result exceeds DOMAIN (Rules O, W).

§

E0022

Window inversion, lo > hi (Rule U).

§

E0023

Comparison indeterminate at the stated precision (Rule T).

§

E0024

Lossy rendering requested without a rounding mode (Rule R).

§

E0025

BIG_BANG_CLAIM or its half-width used as a computational operand (Rule Q.3). Reaching this at runtime is an internal invariant violation; the type system is supposed to make it unreachable, and §21.3-3 requires a compile-fail test proving so.

§

E0030

Binary form is not 64 bytes (Rule B).

§

E0031

Instant outside UCID range (Rule I).

§

E0032

Invalid Crockford base-32.

§

E0040

Civil date outside the renderable range (§14.3). Never a panic.

§

E0041

Invalid civil date for the stated calendar.

§

E0042

second = 60 outside a leap-second instant.

§

E0043

Foreign-unit input finer than the bridge constant permits (Rules A, R, Y).

§

E0050

Profile mismatch (Rule P).

§

E0060

Body parameter missing required provenance or as-measured value (Rules C, Y).

§

E0061

Leap-rule derivation cannot meet the requested drift bound.

§

E0062

Calendar has no anchor; local fields cannot be produced (Rule J.3).

§

E0063

Anchor phase definition not evaluable for this body’s parameters (Rule J.4).

§

E0064

Grouping cycle requested but none derivable from any satellite (§9.6).

§

E0065

Legacy calendar supplied where a derived calendar is required (Rule K.6).

§

E0070

Division by zero, or by an interval containing zero (Appendix H.3); also a cosmology inversion that failed to bracket.

§

E0071

Requested enclosure width unreachable at the permitted depth (Rule X).

§

E0080

Tier index outside the profile’s grid.

Implementations§

Source§

impl Code

Source

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

The wire-stable code string, e.g. "UCAL-E0021".

Source

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

One-line description, matching Appendix E.

Source

pub const fn exit_code(self) -> u8

CLI exit code for this diagnostic (§19.5).

Trait Implementations§

Source§

impl Clone for Code

Source§

fn clone(&self) -> Code

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 Code

Source§

impl Debug for Code

Source§

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

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

impl Display for Code

Source§

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

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

impl Eq for Code

Source§

impl Hash for Code

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 Code

Source§

fn cmp(&self, other: &Code) -> 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§

impl PartialEq for Code

Source§

fn eq(&self, other: &Code) -> 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 Code

Source§

fn partial_cmp(&self, other: &Code) -> 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 Code

Auto Trait Implementations§

§

impl Freeze for Code

§

impl RefUnwindSafe for Code

§

impl Send for Code

§

impl Sync for Code

§

impl Unpin for Code

§

impl UnsafeUnpin for Code

§

impl UnwindSafe for Code

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<U> As for U

Source§

fn as_<T>(self) -> T
where T: CastFrom<U>, U: Sized,

Casts self to type T. The semantics of numeric casting with the as operator are followed, so <T as As>::as_::<U> can be used in the same way as T as U for numeric conversions. 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 = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

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.