pub enum DataConversionError {
NoValue,
ConversionFailed {
from: DataType,
to: DataType,
},
ConversionError(String),
JsonSerializationError(String),
JsonDeserializationError(String),
}Expand description
Error type returned by reusable data conversions.
Variants§
NoValue
No concrete source value is available.
ConversionFailed
The source value type cannot be converted to the requested target type.
ConversionError(String)
Conversion failed because the source value content is invalid or out of range for the target type.
JsonSerializationError(String)
JSON serialization failed while converting a value to JSON text or a JSON value.
JsonDeserializationError(String)
JSON deserialization failed while parsing JSON text.
Trait Implementations§
Source§impl Clone for DataConversionError
impl Clone for DataConversionError
Source§fn clone(&self) -> DataConversionError
fn clone(&self) -> DataConversionError
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 DataConversionError
impl Debug for DataConversionError
Source§impl Display for DataConversionError
impl Display for DataConversionError
Source§impl Error for DataConversionError
impl Error for DataConversionError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns 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()
Source§impl PartialEq for DataConversionError
impl PartialEq for DataConversionError
Source§fn eq(&self, other: &DataConversionError) -> bool
fn eq(&self, other: &DataConversionError) -> bool
Tests for
self and other values to be equal, and is used by ==.impl Eq for DataConversionError
impl StructuralPartialEq for DataConversionError
Auto Trait Implementations§
impl Freeze for DataConversionError
impl RefUnwindSafe for DataConversionError
impl Send for DataConversionError
impl Sync for DataConversionError
impl Unpin for DataConversionError
impl UnsafeUnpin for DataConversionError
impl UnwindSafe for DataConversionError
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