#[non_exhaustive]pub enum ProtocolError {
MissingErrorData,
Other {
message: String,
line: Option<String>,
},
}Expand description
A failure the client raises itself. It is never a typed MSP error from the server, though its message can quote one.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
MissingErrorData
An MSP error response carried no error.data, so it has no kind to
branch on.
Other
A failure the client detected or raised itself, for example: a frame
that broke MSP framing or request correlation; arguments it refused (a
pending turn from another session); its own event delivery failing (a
notification backlog overflow); or, as a turn’s failure, an approval
answer that could not be sent, that the server refused with an
unexpected error, or that named a choice the server did not offer. The
message says what went wrong. A later release may give one of these
cases its own variant, so match Other only as a fallback, never to
detect a specific case.
Implementations§
Trait Implementations§
Source§impl Clone for ProtocolError
impl Clone for ProtocolError
Source§impl Debug for ProtocolError
impl Debug for ProtocolError
Source§impl Display for ProtocolError
impl Display for ProtocolError
impl Eq for ProtocolError
Source§impl Error for ProtocolError
impl Error for ProtocolError
1.30.0 · 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()