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.
PathSegmentsUnbounded
A path carries more segments than the declared magnitude.
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.
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.
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
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.
RefusalSpellingNotAnIdentifier
A rendered decode refusal’s spelling cannot name a rendered item: not one Rust identifier, or a keyword the language already took.
ModuleSpellingNotAnIdentifier
A published module’s spelling cannot name a rendered item: not one Rust identifier, or a keyword the language already took.
MembersAbsent
A shape declares no member at all.
MembersUnbounded
A shape declares more members than the declared magnitude.
Implementations§
Source§impl CodecIssue
impl CodecIssue
Sourcepub fn canonical_bytes(&self) -> Vec<u8> ⓘ
pub fn canonical_bytes(&self) -> Vec<u8> ⓘ
This issue’s canonical bytes on their own.
Sourcepub fn encode_into(&self, into: &mut Vec<u8>)
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
impl CodecIssue
Sourcepub const fn slot(&self) -> u8
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.
Sourcepub const fn observed(&self) -> Observed
pub const fn observed(&self) -> Observed
How what this issue observed differs from the contract that was expected.
Sourcepub const fn class(&self) -> RefusalClass
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
impl Clone for CodecIssue
Source§fn clone(&self) -> CodecIssue
fn clone(&self) -> CodecIssue
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more