Enum re_types::DeserializationError
source · pub enum DeserializationError {
Show 13 variants
Context {
location: String,
source: Box<DeserializationError>,
},
NotImplemented {
fqname: String,
backtrace: Backtrace,
},
MissingData {
backtrace: Backtrace,
},
MissingComponent {
component: ComponentName,
backtrace: Backtrace,
},
MissingStructField {
datatype: DataType,
field_name: String,
backtrace: Backtrace,
},
MismatchedStructFieldLengths {
field1_name: String,
field1_length: usize,
field2_name: String,
field2_length: usize,
backtrace: Backtrace,
},
MissingUnionArm {
datatype: DataType,
arm_name: String,
arm_index: usize,
backtrace: Backtrace,
},
DatatypeMismatch {
expected: DataType,
got: DataType,
backtrace: Backtrace,
},
OffsetOutOfBounds {
offset: usize,
len: usize,
backtrace: Backtrace,
},
OffsetSliceOutOfBounds {
from: usize,
to: usize,
len: usize,
backtrace: Backtrace,
},
SerdeFailure {
reason: String,
backtrace: Backtrace,
},
DataCellError(String),
ValidationError(String),
}
Variants§
Context
NotImplemented
MissingData
MissingComponent
MissingStructField
MismatchedStructFieldLengths
Fields
MissingUnionArm
DatatypeMismatch
OffsetOutOfBounds
OffsetSliceOutOfBounds
SerdeFailure
DataCellError(String)
ValidationError(String)
Implementations§
source§impl DeserializationError
impl DeserializationError
pub fn missing_data() -> DeserializationError
pub fn missing_struct_field( datatype: DataType, field_name: impl AsRef<str> ) -> DeserializationError
pub fn mismatched_struct_field_lengths( field1_name: impl AsRef<str>, field1_length: usize, field2_name: impl AsRef<str>, field2_length: usize ) -> DeserializationError
pub fn missing_union_arm( datatype: DataType, arm_name: impl AsRef<str>, arm_index: usize ) -> DeserializationError
pub fn datatype_mismatch( expected: DataType, got: DataType ) -> DeserializationError
pub fn offset_oob(offset: usize, len: usize) -> DeserializationError
pub fn offset_slice_oob(_: (usize, usize), len: usize) -> DeserializationError
pub fn serde_failure(reason: impl AsRef<str>) -> DeserializationError
sourcepub fn backtrace(&self) -> Option<Backtrace>
pub fn backtrace(&self) -> Option<Backtrace>
Returns the unresolved backtrace associated with this error, if it exists.
Call resolve()
on the returned _Backtrace
to resolve it (costly!).
Trait Implementations§
source§impl Clone for DeserializationError
impl Clone for DeserializationError
source§fn clone(&self) -> DeserializationError
fn clone(&self) -> DeserializationError
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 DeserializationError
impl Debug for DeserializationError
source§impl Display for DeserializationError
impl Display for DeserializationError
source§impl Error for DeserializationError
impl Error for DeserializationError
source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
The lower-level source of this error, if any. Read more
1.0.0 · source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
Auto Trait Implementations§
impl Freeze for DeserializationError
impl RefUnwindSafe for DeserializationError
impl Send for DeserializationError
impl Sync for DeserializationError
impl Unpin for DeserializationError
impl UnwindSafe for DeserializationError
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> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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