Enum cml_cip36::DeserializeFailure
source · pub enum DeserializeFailure {
Show 18 variants
BadAddressType(u8),
BreakInDefiniteLen,
CBOR(Error),
DefiniteLenMismatch(u64, Option<u64>),
DuplicateKey(Key),
EndingBreakMissing,
ExpectedNull,
FixedValueMismatch {
found: Key,
expected: Key,
},
InvalidStructure(Box<dyn Error>),
MandatoryFieldMissing(Key),
NoVariantMatched,
NoVariantMatchedWithCauses(Vec<DeserializeError>),
OutOfRange {
min: usize,
max: usize,
found: usize,
},
RangeCheck {
found: isize,
min: Option<isize>,
max: Option<isize>,
},
TagMismatch {
found: u64,
expected: u64,
},
UnknownKey(Key),
UnexpectedKeyType(Type),
VariableLenNatDecodeFailed,
}
Variants§
BadAddressType(u8)
BreakInDefiniteLen
CBOR(Error)
DefiniteLenMismatch(u64, Option<u64>)
DuplicateKey(Key)
EndingBreakMissing
ExpectedNull
FixedValueMismatch
InvalidStructure(Box<dyn Error>)
Invalid internal structure imposed on top of the CBOR format
MandatoryFieldMissing(Key)
NoVariantMatched
NoVariantMatchedWithCauses(Vec<DeserializeError>)
OutOfRange
RangeCheck
TagMismatch
UnknownKey(Key)
UnexpectedKeyType(Type)
VariableLenNatDecodeFailed
Trait Implementations§
source§impl Debug for DeserializeFailure
impl Debug for DeserializeFailure
source§impl From<DeserializeFailure> for DeserializeError
impl From<DeserializeFailure> for DeserializeError
source§fn from(failure: DeserializeFailure) -> DeserializeError
fn from(failure: DeserializeFailure) -> DeserializeError
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for DeserializeFailure
impl !RefUnwindSafe for DeserializeFailure
impl !Send for DeserializeFailure
impl !Sync for DeserializeFailure
impl Unpin for DeserializeFailure
impl !UnwindSafe for DeserializeFailure
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more