pub enum ProtocolError {
Frame(FrameError),
UnsupportedCommand(i32),
InvariantViolation(&'static str),
Handshake(&'static str),
Server {
code: i32,
message: String,
},
}Expand description
Errors that the Connection state machine can surface.
Variants§
Frame(FrameError)
Frame decoding failed.
UnsupportedCommand(i32)
The remote sent a BaseCommand whose type did not match any populated oneof field.
InvariantViolation(&'static str)
The remote sent a command that violates the local state machine invariants
(e.g. a SendReceipt referencing an unknown producer).
Handshake(&'static str)
The handshake was attempted while the connection was not in a state that supports it.
Server
The peer signalled a fatal error via CommandError or CommandSendError.
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 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 From<FrameError> for ProtocolError
impl From<FrameError> for ProtocolError
Source§fn from(source: FrameError) -> ProtocolError
fn from(source: FrameError) -> ProtocolError
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for ProtocolError
impl RefUnwindSafe for ProtocolError
impl Send for ProtocolError
impl Sync for ProtocolError
impl Unpin for ProtocolError
impl UnsafeUnpin for ProtocolError
impl UnwindSafe for ProtocolError
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