pub enum ProtocolError {
Show 13 variants
InvalidMessageFormat,
EmptyMessageArray,
InvalidMessageType(u64),
InvalidMessageLength {
kind: &'static str,
},
InvalidMessageField {
kind: &'static str,
field: &'static str,
},
DepthLimitExceeded,
ListenerNotConfigured,
MissingSocketAddr,
ExpectedSingleParameter,
ResourceAlreadyTaken {
resource: &'static str,
},
TaskFailed {
task: &'static str,
source: JoinError,
},
UnexpectedResponse {
id: u32,
},
MalformedMessage(String),
}Expand description
Errors indicating a violation of the MessagePack-RPC protocol or message framing.
Variants§
InvalidMessageFormat
Received a value that was not a top-level MessagePack-RPC message array.
EmptyMessageArray
Received an empty top-level MessagePack-RPC message array.
InvalidMessageType(u64)
Received a message with an invalid type tag.
InvalidMessageLength
Received a message body with an unexpected number of fields.
InvalidMessageField
Received a message field that did not have the expected shape or type.
Fields
DepthLimitExceeded
A full MessagePack value exceeded the configured nesting limit.
ListenerNotConfigured
A caller requested a bound socket address before any listener was configured.
MissingSocketAddr
A configured listener does not expose a bound SocketAddr.
ExpectedSingleParameter
A MessagePack-RPC single-parameter helper received the wrong arity.
ResourceAlreadyTaken
A single-consumer resource was taken more than once.
TaskFailed
A background task failed before completing normally.
UnexpectedResponse
Received a response for a request id that has no pending waiter.
MalformedMessage(String)
Received a message that does not match the expected structure.
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)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()