pub struct SerializationError(pub SerializationErrorKind, _);Expand description
The Error type.
This tuple struct is made of two elements:
- an
ErrorKindwhich is used to determine the type of the error. - An internal
State, not meant for direct use outside oferror_chaininternals, containing:- a backtrace, generated when the error is created.
- an error chain, used for the implementation of
Error::cause().
Tuple Fields§
§0: SerializationErrorKindThe kind of the error.
Implementations§
Source§impl SerializationError
impl SerializationError
Sourcepub fn from_kind(kind: SerializationErrorKind) -> SerializationError
pub fn from_kind(kind: SerializationErrorKind) -> SerializationError
Constructs an error from a kind, and generates a backtrace.
Sourcepub fn with_chain<E, K>(error: E, kind: K) -> SerializationError
pub fn with_chain<E, K>(error: E, kind: K) -> SerializationError
Constructs a chained error from another error and a kind, and generates a backtrace.
Sourcepub fn with_boxed_chain<K>(
error: Box<dyn Error + Send>,
kind: K,
) -> SerializationErrorwhere
K: Into<SerializationErrorKind>,
pub fn with_boxed_chain<K>(
error: Box<dyn Error + Send>,
kind: K,
) -> SerializationErrorwhere
K: Into<SerializationErrorKind>,
Construct a chained error from another boxed error and a kind, and generates a backtrace
Sourcepub fn kind(&self) -> &SerializationErrorKind
pub fn kind(&self) -> &SerializationErrorKind
Returns the kind of the error.
Sourcepub fn backtrace(&self) -> Option<&Backtrace>
pub fn backtrace(&self) -> Option<&Backtrace>
Returns the backtrace associated with this error.
Sourcepub fn chain_err<F, EK>(self, error: F) -> SerializationError
pub fn chain_err<F, EK>(self, error: F) -> SerializationError
Extends the error chain with a new entry.
Sourcepub fn description(&self) -> &str
pub fn description(&self) -> &str
A short description of the error.
This method is identical to Error::description()
Trait Implementations§
Source§impl ChainedError for SerializationError
impl ChainedError for SerializationError
Source§type ErrorKind = SerializationErrorKind
type ErrorKind = SerializationErrorKind
Associated kind type.
Source§fn from_kind(kind: Self::ErrorKind) -> Self
fn from_kind(kind: Self::ErrorKind) -> Self
Constructs an error from a kind, and generates a backtrace.
Source§fn with_chain<E, K>(error: E, kind: K) -> Self
fn with_chain<E, K>(error: E, kind: K) -> Self
Constructs a chained error from another error and a kind, and generates a backtrace.
Source§fn display_chain<'a>(&'a self) -> DisplayChain<'a, Self>
fn display_chain<'a>(&'a self) -> DisplayChain<'a, Self>
Returns an object which implements
Display for printing the full
context of this error. Read moreSource§impl Debug for SerializationError
impl Debug for SerializationError
Source§impl Display for SerializationError
impl Display for SerializationError
Source§impl Error for SerializationError
impl Error for SerializationError
Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
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
Source§impl<'a> From<&'a str> for SerializationError
impl<'a> From<&'a str> for SerializationError
Source§impl From<BusError> for SerializationError
impl From<BusError> for SerializationError
Source§impl From<DecodeError> for SerializationError
impl From<DecodeError> for SerializationError
Source§fn from(e: DecodeError) -> Self
fn from(e: DecodeError) -> Self
Converts to this type from the input type.
Source§impl From<Error> for SerializationError
impl From<Error> for SerializationError
Source§impl From<Error> for SerializationError
impl From<Error> for SerializationError
Source§fn from(e: RmpEncodeError) -> Self
fn from(e: RmpEncodeError) -> Self
Converts to this type from the input type.
Source§impl From<Error> for SerializationError
impl From<Error> for SerializationError
Source§fn from(e: RmpDecodeError) -> Self
fn from(e: RmpDecodeError) -> Self
Converts to this type from the input type.
Source§impl From<Error> for SerializationError
impl From<Error> for SerializationError
Source§impl From<SerializationError> for SerializationErrorKind
impl From<SerializationError> for SerializationErrorKind
Source§fn from(e: SerializationError) -> Self
fn from(e: SerializationError) -> Self
Converts to this type from the input type.
Source§impl From<SerializationErrorKind> for SerializationError
impl From<SerializationErrorKind> for SerializationError
Source§fn from(e: SerializationErrorKind) -> Self
fn from(e: SerializationErrorKind) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for SerializationError
impl !RefUnwindSafe for SerializationError
impl Send for SerializationError
impl !Sync for SerializationError
impl Unpin for SerializationError
impl !UnwindSafe for SerializationError
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