#[non_exhaustive]pub enum ProtocolError {
MissingContentLength,
InvalidContentLength(String),
RequestCancelled,
CliStartupTimeout,
CliStartupFailed,
VersionMismatch {
server: u32,
min: u32,
max: u32,
},
VersionChanged {
previous: u32,
current: u32,
},
}Expand description
Specific protocol-level errors in the JSON-RPC transport or CLI lifecycle.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
MissingContentLength
Missing Content-Length header in a JSON-RPC message.
InvalidContentLength(String)
Invalid Content-Length header value.
RequestCancelled
A pending JSON-RPC request was cancelled (e.g. the response channel was dropped).
CliStartupTimeout
The CLI process did not report a listening port within the timeout.
CliStartupFailed
The CLI process exited before reporting a listening port.
VersionMismatch
The CLI server’s protocol version is outside the SDK’s supported range.
Fields
VersionChanged
The CLI server’s protocol version changed between calls.
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
1.30.0 · 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()
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