pub struct SerError(/* private fields */);Expand description
Errors that can be thrown during serialisation or deserialisation.
Implementations§
Source§impl SerError
impl SerError
Sourcepub fn kind(&self) -> SerErrorKind
pub fn kind(&self) -> SerErrorKind
Return the stable category of this serialisation error.
Sourcepub fn invalid_data(message: impl Into<String>) -> SerError
pub fn invalid_data(message: impl Into<String>) -> SerError
Construct an invalid-data serialisation error.
Sourcepub fn invalid_type(message: impl Into<String>) -> SerError
pub fn invalid_type(message: impl Into<String>) -> SerError
Construct an invalid-type serialisation error.
Sourcepub fn no_buffers_available(message: impl Into<String>) -> SerError
pub fn no_buffers_available(message: impl Into<String>) -> SerError
Construct a no-buffers-available serialisation error.
Sourcepub fn third_party(
context: impl Into<String>,
source: impl Error + 'static,
) -> SerError
pub fn third_party( context: impl Into<String>, source: impl Error + 'static, ) -> SerError
Construct a third-party serialisation error.
Trait Implementations§
Source§impl Error for SerError
impl Error for SerError
Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0:
use the Display impl or to_string()
Source§fn cause(&self) -> Option<&dyn Error>
fn cause(&self) -> Option<&dyn Error>
👎Deprecated since 1.33.0:
replaced by Error::source, which can support downcasting
Source§impl ErrorCompat for SerError
impl ErrorCompat for SerError
Source§fn iter_chain(&self) -> ChainCompat<'_, '_>where
Self: AsErrorSource,
fn iter_chain(&self) -> ChainCompat<'_, '_>where
Self: AsErrorSource,
Returns an iterator for traversing the chain of errors,
starting with the current error
and continuing with recursive calls to
Error::source. Read moreSource§impl From<SerError> for NetworkBridgeError
impl From<SerError> for NetworkBridgeError
Auto Trait Implementations§
impl !Freeze for SerError
impl !RefUnwindSafe for SerError
impl !Send for SerError
impl !Sync for SerError
impl Unpin for SerError
impl UnsafeUnpin for SerError
impl !UnwindSafe for SerError
Blanket Implementations§
Source§impl<T> AsErrorSource for Twhere
T: Error + 'static,
impl<T> AsErrorSource for Twhere
T: Error + 'static,
Source§fn as_error_source(&self) -> &(dyn Error + 'static)
fn as_error_source(&self) -> &(dyn Error + 'static)
For maximum effectiveness, this needs to be called as a method
to benefit from Rust’s automatic dereferencing of method
receivers.
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