Enum cbor_protocol::ProtocolError
source · [−]pub enum ProtocolError {
Timeout,
NoDataReceived,
ReceiveFailed {
err: Error,
},
SendFailed {
dest: SocketAddr,
err: Error,
},
IoError {
err: Error,
},
ParseFail {
err: String,
},
}
Expand description
An error generated during protocol execution
Variants
Timeout
Indicates a timeout when sending or receiving
NoDataReceived
Indicates no data was received
ReceiveFailed
Fields
err: Error
Cause of receive failure
Indicates a failure to receive
SendFailed
Indicates a failure to send
IoError
Fields
err: Error
Root Io Error
Indicates a non-send/received Io error
ParseFail
Fields
err: String
Cause of parsing failure
Indicates a failure to parse a message
Trait Implementations
sourceimpl Debug for ProtocolError
impl Debug for ProtocolError
sourceimpl Display for ProtocolError
impl Display for ProtocolError
sourceimpl Fail for ProtocolError
impl Fail for ProtocolError
sourcefn cause(&self) -> Option<&dyn Fail>
fn cause(&self) -> Option<&dyn Fail>
Returns a reference to the underlying cause of this failure, if it is an error that wraps other errors. Read more
sourcefn backtrace(&self) -> Option<&Backtrace>
fn backtrace(&self) -> Option<&Backtrace>
Returns a reference to the Backtrace
carried by this failure, if it
carries one. Read more
Auto Trait Implementations
impl !RefUnwindSafe for ProtocolError
impl Send for ProtocolError
impl Sync for ProtocolError
impl Unpin for ProtocolError
impl !UnwindSafe for ProtocolError
Blanket Implementations
impl<T> AsFail for T where
T: Fail,
impl<T> AsFail for T where
T: Fail,
fn as_fail(&self) -> &(dyn Fail + 'static)
fn as_fail(&self) -> &(dyn Fail + 'static)
Converts a reference to Self
into a dynamic trait object of Fail
.
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more