#[non_exhaustive]pub enum ProtocolErrorKind {
MissingContentLength,
InvalidContentLength(String),
RequestCancelled,
CliStartupTimeout,
CliStartupFailed,
VersionMismatch {
server: u32,
min: u32,
max: u32,
},
VersionChanged {
previous: u32,
current: u32,
},
}Expand description
Specific protocol-level error kind 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 Clone for ProtocolErrorKind
impl Clone for ProtocolErrorKind
Source§fn clone(&self) -> ProtocolErrorKind
fn clone(&self) -> ProtocolErrorKind
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ProtocolErrorKind
impl Debug for ProtocolErrorKind
Source§impl Display for ProtocolErrorKind
impl Display for ProtocolErrorKind
impl Eq for ProtocolErrorKind
Source§impl From<ProtocolErrorKind> for Error
impl From<ProtocolErrorKind> for Error
Source§fn from(kind: ProtocolErrorKind) -> Self
fn from(kind: ProtocolErrorKind) -> Self
Converts to this type from the input type.
Source§impl PartialEq for ProtocolErrorKind
impl PartialEq for ProtocolErrorKind
Source§fn eq(&self, other: &ProtocolErrorKind) -> bool
fn eq(&self, other: &ProtocolErrorKind) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for ProtocolErrorKind
Auto Trait Implementations§
impl Freeze for ProtocolErrorKind
impl RefUnwindSafe for ProtocolErrorKind
impl Send for ProtocolErrorKind
impl Sync for ProtocolErrorKind
impl Unpin for ProtocolErrorKind
impl UnsafeUnpin for ProtocolErrorKind
impl UnwindSafe for ProtocolErrorKind
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