Skip to main content

CodecError

Struct CodecError 

Source
pub struct CodecError { /* private fields */ }
Expand description

How declaring a codec says no.

The passes that reach it are dependent in a stated order, so exactly one cause is true of a refused path, spelling, or road — while the pass over a shape’s members co-establishes freely, because a caller told about one colliding member and not the next is a caller who repairs a shape one attempt at a time.

Implementations§

Source§

impl CodecError

Source

pub fn of(issue: CodecIssue) -> Self

The refusal one established issue makes.

Source

pub fn over(first: CodecIssue, rest: Vec<CodecIssue>) -> Self

The refusal a pass whose checks co-establish makes.

The caller arrives holding every issue its pass established, so the posture the body writes is about the REPORT and never about the pass: where the issues fit it carries all of them, and where they do not it carries what fits and counts the rest.

Source

pub fn first_issue(&self) -> &CodecIssue

The first issue the pass established, which every refusal has.

Source

pub fn issues(&self) -> &NonEmpty<CodecIssue, CODEC_ISSUE_LIMIT>

Every issue this refusal carries, in the order the pass established them; structurally at least one.

Source

pub const fn capping(&self) -> Capping

Whether this refusal carries every issue its pass established.

Trait Implementations§

Source§

impl Clone for CodecError

Source§

fn clone(&self) -> CodecError

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 Debug for CodecError

Source§

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

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

impl Display for CodecError

Source§

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

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

impl Eq for CodecError

Source§

impl Error for CodecError

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 CodecError

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 CodecError

Source§

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

Source§

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

The issues established beyond the primary cause; the primary is the summary’s own subject, never a member of its related set.

Source§

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

This home declares no repair of its own.

Every issue is about what the caller’s own declaration states, so the repair is that declaration; a sentence composed here would be this compiler citing a fact nobody declared.

Source§

const PHASE: Phase = Phase::Capture

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

const FAMILY: Family = CODEC_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§

impl StructuralPartialEq for CodecError

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.