Skip to main content

DeclarationError

Enum DeclarationError 

Source
pub enum DeclarationError {
    NamespaceEmpty,
    StemEmpty,
    NotAnIdentifier,
    Absent {
        seat: Seat,
    },
    Doubled {
        seat: Seat,
    },
    Unbounded {
        seat: Seat,
        bound: u64,
        observed: u64,
    },
    NotACurve {
        observed: u64,
    },
}
Expand description

How the values one descriptor declaration states are not a lawful declaration.

Seven shapes over one seat roster rather than one row per seat: what refuses is the SHAPE of the disagreement, and which seat it was about is the other half of the same sentence.

Variants§

§

NamespaceEmpty

A namespaced name states no owner.

§

StemEmpty

A namespaced name states no spelling.

§

NotAnIdentifier

A spelling written where the rendering needs an item name cannot be one: not one Rust identifier, or a keyword the language already took.

§

Absent

A seat that admits no emptiness was stated empty.

Fields

§seat: Seat

What was being stated.

§

Doubled

Two of one roster’s members carry one spelling.

Fields

§seat: Seat

What was being stated.

§

Unbounded

A roster states more members than its declared magnitude admits.

Fields

§seat: Seat

What was being stated.

§bound: u64

The declared magnitude.

§observed: u64

How many were stated.

§

NotACurve

An input-size axis states too few sizes for a growth class to be read off it.

Fields

§observed: u64

How many sizes were stated.

Implementations§

Source§

impl DeclarationError

Source

pub const fn slot(&self) -> u8

This refusal’s position in its own roster, appended and never renumbered.

Source

pub const fn classified(&self) -> Observed

How what was observed differs from the vocabulary that was expected.

Source

pub fn canonical_bytes(&self) -> Vec<u8>

This refusal’s canonical bytes: its own position, then the members it carries.

Source§

impl DeclarationError

Source

pub fn unbounded(seat: Seat, bound: usize, observed: usize) -> Self

The refusal one overrun roster amounts to, with both counts widened once.

Trait Implementations§

Source§

impl Clone for DeclarationError

Source§

fn clone(&self) -> DeclarationError

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 DeclarationError

Source§

impl Debug for DeclarationError

Source§

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

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

impl Display for DeclarationError

Source§

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

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

impl Eq for DeclarationError

Source§

impl Error for DeclarationError

1.30.0 · Source§

fn source(&self) -> Option<&(dyn Error + 'static)>

Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§

fn description(&self) -> &str

👎Deprecated since 1.42.0:

use the Display impl or to_string()

1.0.0 · Source§

fn cause(&self) -> Option<&dyn Error>

👎Deprecated since 1.33.0:

replaced by Error::source, which can support downcasting

Source§

fn provide<'a>(&'a self, request: &mut Request<'a>)

🔬This is a nightly-only experimental API. (error_generic_member_access)
Provides type-based access to context intended for error reports. Read more
Source§

impl Hash for DeclarationError

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 PartialEq for DeclarationError

Source§

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

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

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

Inequality operator !=. Read more
Source§

impl Refused for DeclarationError

Source§

fn related(&self) -> Vec<Vec<u8>>

A single cause enumerates nothing: the primary cause is the summary’s own subject, never a member of its related set.

Source§

const PHASE: Phase = Phase::Capture

The step of the road this refusal is raised at.
Source§

const FAMILY: Family = DECLARATION_FAMILY

The family whose issue space this refusal’s related identities derive in. Read more
Source§

fn class(&self) -> RefusalClass

Which class of refusal the summary line opens with.
Source§

fn first(&self) -> String

How the first established issue reads for a person.
Source§

fn observed(&self) -> Observed

How what was observed differs from the expected contract, read off that same first issue.
Source§

fn body(&self) -> LineBody

What the summary line is a summary of.
Source§

fn repairs(&self) -> Bounded<Repair, REPAIR_LIMIT>

The owner-declared repairs that apply.
Source§

impl StructuralPartialEq for DeclarationError

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, <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.