#[non_exhaustive]pub enum HandshakeError<E: Error + 'static> {
Encode(Error),
Transport(E),
InvalidResult(Error),
}Expand description
Failure before the connection reaches the initialized state.
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.
Encode(Error)
The initialize params could not be encoded as JSON.
Transport(E)
The connection failed the initialize request or the initialized
notification. E is the connection’s own error type, so this can also
carry a server refusal the connection reports.
InvalidResult(Error)
The initialize result did not match the MSP shape this SDK expects.
Trait Implementations§
Source§impl<E> Display for HandshakeError<E>
impl<E> Display for HandshakeError<E>
Source§impl<E> Error for HandshakeError<E>
impl<E> Error for HandshakeError<E>
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<E> !RefUnwindSafe for HandshakeError<E>
impl<E> !UnwindSafe for HandshakeError<E>
impl<E> Forget for HandshakeError<E>
impl<E> Freeze for HandshakeError<E>where
E: Freeze,
impl<E> Move for HandshakeError<E>
impl<E> Send for HandshakeError<E>where
E: Send,
impl<E> Sync for HandshakeError<E>where
E: Sync,
impl<E> Unpin for HandshakeError<E>where
E: Unpin,
impl<E> UnsafeUnpin for HandshakeError<E>where
E: UnsafeUnpin,
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