pub struct ConversionError;Expand description
Represents errors emitted during transformations between complex data types.
This error type is used for conversions between non-scalar types such as structs, enums, and unions. It’s commonly used in type conversion, data mapping, and transformation operations.
Implementations§
Trait Implementations§
Source§impl Debug for ConversionError
impl Debug for ConversionError
Source§impl Display for ConversionError
impl Display for ConversionError
Source§impl Error for ConversionError
impl Error for ConversionError
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 ThinContext for ConversionError
impl ThinContext for ConversionError
Source§fn report<C: Error + Send + Sync + 'static>(ctx: C) -> Report<Self>
fn report<C: Error + Send + Sync + 'static>(ctx: C) -> Report<Self>
Create a new error report by converting from another context type. Read more
Source§fn attach_with<A>(attachment: impl FnOnce() -> A) -> Report<Self>where
A: Display,
fn attach_with<A>(attachment: impl FnOnce() -> A) -> Report<Self>where
A: Display,
Create an error report with an attachment computed by a closure. Read more
Source§fn attach<A>(value: A) -> Report<Self>where
A: Display,
fn attach<A>(value: A) -> Report<Self>where
A: Display,
Create an error report with a displayable attachment.
Source§fn attach_dbg<A>(value: A) -> Report<Self>where
A: Debug,
fn attach_dbg<A>(value: A) -> Report<Self>where
A: Debug,
Create an error report with a debug-formatted attachment. Read more
Source§fn attach_kv<K, V>(key: K, value: V) -> Report<Self>
fn attach_kv<K, V>(key: K, value: V) -> Report<Self>
Create an error report with a key-value pair attachment.
Source§fn attach_kv_dbg<K, V>(key: K, value: V) -> Report<Self>
fn attach_kv_dbg<K, V>(key: K, value: V) -> Report<Self>
Create an error report with a key-value pair where the value is debug-formatted.
Source§fn attach_field<S: Display>(key: &'static str, status: S) -> Report<Self>
fn attach_field<S: Display>(key: &'static str, status: S) -> Report<Self>
Create an error report with a field attachment. Read more
Source§fn expected_actual<A: Display>(expected: A, actual: A) -> Report<Self>
fn expected_actual<A: Display>(expected: A, actual: A) -> Report<Self>
Create an error report showing expected vs actual values. Read more
Source§fn attach_ty_val<A: Display>(value: A) -> Report<Self>
fn attach_ty_val<A: Display>(value: A) -> Report<Self>
Create an error report with a type-value pair attachment. Read more
Source§fn attach_ty_dbg<A: Debug>(value: A) -> Report<Self>
fn attach_ty_dbg<A: Debug>(value: A) -> Report<Self>
Create an error report with a type-value pair where the value is debug-formatted.
Auto Trait Implementations§
impl Freeze for ConversionError
impl RefUnwindSafe for ConversionError
impl Send for ConversionError
impl Sync for ConversionError
impl Unpin for ConversionError
impl UnsafeUnpin for ConversionError
impl UnwindSafe for ConversionError
Blanket Implementations§
impl<T> Attachment for T
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