Skip to main content

CodecIssue

Enum CodecIssue 

Source
pub enum CodecIssue {
Show 13 variants PathSegmentsAbsent, SegmentNotAnIdentifier { segment: String, }, PathSegmentsUnbounded { bound: u64, observed: u64, }, MemberSpellingAbsent, MemberSpellingNotAnIdentifier { spelling: String, }, MemberSpellingDoubled { spelling: String, }, MemberShadowsBinding { spelling: String, binding: &'static str, }, AssemblyRoadAbsent, AssemblyRoadNotAnIdentifier { spelling: String, }, RefusalSpellingNotAnIdentifier { spelling: String, }, ModuleSpellingNotAnIdentifier { spelling: String, }, MembersAbsent, MembersUnbounded { bound: u64, observed: u64, },
}
Expand description

How one declaration of this home’s vocabulary refuses.

No row is payload-free where a payload would tell a caller what to repair: a row names the spelling it refused at, or the two counts a magnitude was passed by.

Variants§

§

PathSegmentsAbsent

A rendered type path names no segment, so it names nothing.

§

SegmentNotAnIdentifier

A path segment cannot name a rendered item — not one Rust identifier, or a keyword the language already took — so the rendering would write tokens the caller’s compiler reads as something else.

Fields

§segment: String

The segment as it was spelled.

§

PathSegmentsUnbounded

A path carries more segments than the declared magnitude.

Fields

§bound: u64

The declared bound.

§observed: u64

The observed count.

§

MemberSpellingAbsent

A member states no spelling, so nothing names it in either road.

§

MemberSpellingNotAnIdentifier

A member’s spelling cannot name a rendered item: not one Rust identifier, or a keyword the language already took.

Fields

§spelling: String

The spelling as it was stated.

§

MemberSpellingDoubled

Two members of one shape carry one spelling, so the decode road would bind one local twice and the assembly would be handed the second.

Fields

§spelling: String

The spelling two members share.

§

MemberShadowsBinding

A member’s spelling is one of the locals the decode road declares for itself, so the member’s binding would shadow the rendering’s and the road would go on reading a value nobody meant.

Fields

§spelling: String

The member that collided.

§binding: &'static str

The binding it collided with.

§

AssemblyRoadAbsent

An assembly road states no spelling.

§

AssemblyRoadNotAnIdentifier

An assembly road’s spelling cannot name a rendered item: not one Rust identifier, or a keyword the language already took.

Fields

§spelling: String

The spelling as it was stated.

§

RefusalSpellingNotAnIdentifier

A rendered decode refusal’s spelling cannot name a rendered item: not one Rust identifier, or a keyword the language already took.

Fields

§spelling: String

The spelling as it was stated.

§

ModuleSpellingNotAnIdentifier

A published module’s spelling cannot name a rendered item: not one Rust identifier, or a keyword the language already took.

Fields

§spelling: String

The spelling as it was stated.

§

MembersAbsent

A shape declares no member at all.

§

MembersUnbounded

A shape declares more members than the declared magnitude.

Fields

§bound: u64

The declared bound.

§observed: u64

The observed count.

Implementations§

Source§

impl CodecIssue

Source

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

This issue’s canonical bytes on their own.

Source

pub fn encode_into(&self, into: &mut Vec<u8>)

Appends this issue’s canonical bytes: the row’s position in the declared roster, then the typed material that row carries, framed.

Source§

impl CodecIssue

Source

pub const fn slot(&self) -> u8

This row’s position in the declared roster, written ahead of the issue’s own material.

Appended and never renumbered: the byte stands inside every identity derived over a refusal that names it.

Source

pub const fn observed(&self) -> Observed

How what this issue observed differs from the contract that was expected.

Source

pub const fn class(&self) -> RefusalClass

Which class of refusal a summary line opens with where this issue is the first established.

Trait Implementations§

Source§

impl Clone for CodecIssue

Source§

fn clone(&self) -> CodecIssue

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 CodecIssue

Source§

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

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

impl Display for CodecIssue

Source§

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

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

impl Eq for CodecIssue

Source§

impl Hash for CodecIssue

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 CodecIssue

Source§

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

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

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

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for CodecIssue

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.