pub enum ProtocolError {
IoException {
info: String,
},
NotInitialized,
MessageTooShort {
operation: &'static str,
expected: usize,
received: usize,
},
UnexpectedData,
}
Variants§
IoException
{info}
NotInitialized
Connection has not been initialized
MessageTooShort
Not enough bytes received - ‘{operation}’ expected {expected} bytes, {received} received
UnexpectedData
Unexpected data received
Trait Implementations§
Source§impl Debug for ProtocolError
impl Debug for ProtocolError
Source§impl Display for ProtocolError
impl Display for ProtocolError
Source§impl Error for ProtocolError
impl Error for ProtocolError
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 ProtocolError
impl ErrorCompat for ProtocolError
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<ProtocolError> for Error
impl From<ProtocolError> for Error
Source§fn from(value: ProtocolError) -> Self
fn from(value: ProtocolError) -> Self
Converts to this type from the input type.
Source§impl<__T0> IntoError<ProtocolError> for IoExceptionSnafu<__T0>
impl<__T0> IntoError<ProtocolError> for IoExceptionSnafu<__T0>
Source§fn into_error(self, error: Self::Source) -> ProtocolError
fn into_error(self, error: Self::Source) -> ProtocolError
Combine the information to produce the error
Source§impl<__T0, __T1, __T2> IntoError<ProtocolError> for MessageTooShortSnafu<__T0, __T1, __T2>where
ProtocolError: Error + ErrorCompat,
__T0: Into<&'static str>,
__T1: Into<usize>,
__T2: Into<usize>,
impl<__T0, __T1, __T2> IntoError<ProtocolError> for MessageTooShortSnafu<__T0, __T1, __T2>where
ProtocolError: Error + ErrorCompat,
__T0: Into<&'static str>,
__T1: Into<usize>,
__T2: Into<usize>,
Source§fn into_error(self, error: Self::Source) -> ProtocolError
fn into_error(self, error: Self::Source) -> ProtocolError
Combine the information to produce the error
Source§impl IntoError<ProtocolError> for NotInitializedSnafu
impl IntoError<ProtocolError> for NotInitializedSnafu
Source§fn into_error(self, error: Self::Source) -> ProtocolError
fn into_error(self, error: Self::Source) -> ProtocolError
Combine the information to produce the error
Source§impl IntoError<ProtocolError> for UnexpectedDataSnafu
impl IntoError<ProtocolError> for UnexpectedDataSnafu
Source§fn into_error(self, error: Self::Source) -> ProtocolError
fn into_error(self, error: Self::Source) -> ProtocolError
Combine the information to produce the error
Auto Trait Implementations§
impl Freeze for ProtocolError
impl RefUnwindSafe for ProtocolError
impl Send for ProtocolError
impl Sync for ProtocolError
impl Unpin for ProtocolError
impl UnwindSafe for ProtocolError
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