pub enum HandshakeError {
NothingOffered,
MalformedResult {
method: &'static str,
field: &'static str,
detail: String,
},
Negotiation(NegotiationError),
Transport(TransportError),
Assembling {
method: &'static str,
source: JsonObjectError,
},
}Expand description
Why a session could not be established.
Variants§
NothingOffered
The client was built offering no revision.
Separate from an unsupported server because the two need different fixes: one is a misconfigured client, the other is a peer this build cannot speak to.
MalformedResult
The peer’s answer is missing a field the schema marks required, or the field holds the wrong shape.
Named by field so the reader knows which part of the peer to look at. “Malformed initialize result” sends them looking at the whole message.
Fields
Negotiation(NegotiationError)
This build cannot speak any revision the peer offers.
Transport(TransportError)
The request or the notification could not be delivered.
Assembling
A params object this client assembled was not valid JSON.
Fields
§
source: JsonObjectErrorThe underlying parse failure.
Trait Implementations§
Source§impl Clone for HandshakeError
impl Clone for HandshakeError
Source§impl Debug for HandshakeError
impl Debug for HandshakeError
Source§impl Display for HandshakeError
impl Display for HandshakeError
impl Eq for HandshakeError
Source§impl Error for HandshakeError
impl Error for HandshakeError
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<HandshakeError> for ConnectError
impl From<HandshakeError> for ConnectError
Source§fn from(source: HandshakeError) -> Self
fn from(source: HandshakeError) -> Self
Converts to this type from the input type.
Source§impl From<HandshakeError> for ConnectError
impl From<HandshakeError> for ConnectError
Source§fn from(source: HandshakeError) -> Self
fn from(source: HandshakeError) -> Self
Converts to this type from the input type.
Source§impl From<HandshakeError> for StdioConnectError
impl From<HandshakeError> for StdioConnectError
Source§fn from(source: HandshakeError) -> Self
fn from(source: HandshakeError) -> Self
Converts to this type from the input type.
Source§impl From<NegotiationError> for HandshakeError
impl From<NegotiationError> for HandshakeError
Source§fn from(source: NegotiationError) -> Self
fn from(source: NegotiationError) -> Self
Converts to this type from the input type.
Source§impl From<TransportError> for HandshakeError
impl From<TransportError> for HandshakeError
Source§fn from(source: TransportError) -> Self
fn from(source: TransportError) -> Self
Converts to this type from the input type.
Source§impl PartialEq for HandshakeError
impl PartialEq for HandshakeError
impl StructuralPartialEq for HandshakeError
Auto Trait Implementations§
impl Freeze for HandshakeError
impl RefUnwindSafe for HandshakeError
impl Send for HandshakeError
impl Sync for HandshakeError
impl Unpin for HandshakeError
impl UnsafeUnpin for HandshakeError
impl UnwindSafe for HandshakeError
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