pub enum DecodeRefusal {
Truncated,
LengthPastRemaining,
LengthPastAddressableWidth,
CountPastDeclaredWidth,
TextNotUtf8,
MemberNotAdmitted,
SlotNotAdmitted,
NestedMemberRefused,
PresenceNotAdmitted,
TrailingBytes,
NotAssembled,
}Expand description
One arm of the decode refusal this home renders, by the spelling it is rendered under.
The declared name is the arm’s own Rust spelling, because this roster IS the rendered type’s variant list.
Which arms name the member a read was standing at is said once, at carries_member.
Variants§
Truncated
The material ended inside a member.
LengthPastRemaining
A declared length runs past the material that remains.
LengthPastAddressableWidth
A declared length does not fit an addressable width.
CountPastDeclaredWidth
A declared count does not fit the width its member is held at.
TextNotUtf8
Framed bytes that were to be text are not UTF-8.
MemberNotAdmitted
The member’s own type refused what was read for it.
SlotNotAdmitted
A slot names no arm of the roster it was declared over.
NestedMemberRefused
A nested codec refused the framed material.
PresenceNotAdmitted
A presence byte is neither of the two the encode road writes.
TrailingBytes
Material remains after the last declared member.
NotAssembled
Every member was read and the road that assembles them refused.
Implementations§
Source§impl DecodeRefusal
impl DecodeRefusal
Sourcepub const fn carries_member(self) -> bool
pub const fn carries_member(self) -> bool
Whether this arm names the member the read was standing at.
The two that do not are facts about the whole material and about the assembly, and a member seat on either would name a member no read was standing at.
Trait Implementations§
Source§impl Clone for DecodeRefusal
impl Clone for DecodeRefusal
Source§fn clone(&self) -> DecodeRefusal
fn clone(&self) -> DecodeRefusal
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more