Enum alkahest::DeserializeError
source · pub enum DeserializeError {
OutOfBounds,
WrongAddress,
WrongLength,
InvalidUsize(u32),
InvalidIsize(FixedIsizeType),
WrongVariant(u32),
NonUtf8(Utf8Error),
IntegerOverflow,
Incompatible,
}
Expand description
Error that can occur during deserialization.
Variants§
OutOfBounds
Indicates that input buffer is smaller than expected value length.
WrongAddress
Relative address is invalid.
WrongLength
Incorrect expected value length.
InvalidUsize(u32)
Size value exceeds the maximum usize
for current platform.
InvalidIsize(FixedIsizeType)
Size value exceeds the maximum isize
for current platform.
WrongVariant(u32)
Enum variant is invalid.
NonUtf8(Utf8Error)
Bytes slice is not UTF8 where str
is expected.
IntegerOverflow
Signals that deserialization of integer value fails due to destination type being too small.
This can happen when deserializing Vlq
formula
into fixed-size integer type.
Incompatible
Data is incompatible with the type to be deserialized.
Trait Implementations§
source§impl Clone for DeserializeError
impl Clone for DeserializeError
source§fn clone(&self) -> DeserializeError
fn clone(&self) -> DeserializeError
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for DeserializeError
impl Debug for DeserializeError
impl Copy for DeserializeError
Auto Trait Implementations§
impl RefUnwindSafe for DeserializeError
impl Send for DeserializeError
impl Sync for DeserializeError
impl Unpin for DeserializeError
impl UnwindSafe for DeserializeError
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<'de, F, T> Deserialize<'de, As<F>> for Twhere
F: BareFormula + ?Sized,
T: Deserialize<'de, F>,
impl<'de, F, T> Deserialize<'de, As<F>> for Twhere F: BareFormula + ?Sized, T: Deserialize<'de, F>,
source§fn deserialize(deserializer: Deserializer<'de>) -> Result<T, DeserializeError>
fn deserialize(deserializer: Deserializer<'de>) -> Result<T, DeserializeError>
Deserializes value provided deserializer.
Returns deserialized value and the number of bytes consumed from
the and of input. Read more
source§fn deserialize_in_place(
&mut self,
deserializer: Deserializer<'de>
) -> Result<(), DeserializeError>
fn deserialize_in_place( &mut self, deserializer: Deserializer<'de> ) -> Result<(), DeserializeError>
Deserializes value in-place provided deserializer.
Overwrites
self
with data from the input
. Read moresource§impl<'de, F, T> Deserialize<'de, Ref<F>> for Twhere
F: BareFormula + ?Sized,
T: Deserialize<'de, F> + ?Sized,
impl<'de, F, T> Deserialize<'de, Ref<F>> for Twhere F: BareFormula + ?Sized, T: Deserialize<'de, F> + ?Sized,
source§fn deserialize(de: Deserializer<'de>) -> Result<T, DeserializeError>
fn deserialize(de: Deserializer<'de>) -> Result<T, DeserializeError>
Deserializes value provided deserializer.
Returns deserialized value and the number of bytes consumed from
the and of input. Read more
source§fn deserialize_in_place(
&mut self,
de: Deserializer<'de>
) -> Result<(), DeserializeError>
fn deserialize_in_place( &mut self, de: Deserializer<'de> ) -> Result<(), DeserializeError>
Deserializes value in-place provided deserializer.
Overwrites
self
with data from the input
. Read more