Enum longbridge_wscli::WsClientError
source · [−]pub enum WsClientError {
UnexpectedResponse,
Decode(DecodeError),
ConnectTimeout,
RequestTimeout,
ConnectionClosed {
reason: Option<WsCloseReason>,
},
ClientClosed,
ResponseError {
status: u8,
detail: Option<WsResponseErrorDetail>,
},
Cancelled,
InvalidUrl(ParseError),
Websocket(Error),
}Expand description
Websocket client error type
Variants
UnexpectedResponse
Unexpected response
Decode(DecodeError)
Decode message error
ConnectTimeout
Connect timeout
RequestTimeout
Request timeout
ConnectionClosed
Fields
reason: Option<WsCloseReason>The reason the connection was closed
Connection closed
ClientClosed
Client is closed
ResponseError
The server responded a status code not equal to 0
Cancelled
The request has been cancelled
InvalidUrl(ParseError)
Invalid url
Websocket(Error)
Websocket error
Trait Implementations
sourceimpl Debug for WsClientError
impl Debug for WsClientError
sourceimpl Display for WsClientError
impl Display for WsClientError
sourceimpl Error for WsClientError
impl Error for WsClientError
sourcefn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
The lower-level source of this error, if any. Read more
1.0.0 · sourcefn description(&self) -> &str
fn description(&self) -> &str
👎 Deprecated since 1.42.0:
use the Display impl or to_string()
sourceimpl From<DecodeError> for WsClientError
impl From<DecodeError> for WsClientError
sourcefn from(source: DecodeError) -> Self
fn from(source: DecodeError) -> Self
Converts to this type from the input type.
sourceimpl From<Error> for WsClientError
impl From<Error> for WsClientError
sourceimpl From<ParseError> for WsClientError
impl From<ParseError> for WsClientError
sourcefn from(source: ParseError) -> Self
fn from(source: ParseError) -> Self
Converts to this type from the input type.
Auto Trait Implementations
impl !RefUnwindSafe for WsClientError
impl Send for WsClientError
impl Sync for WsClientError
impl Unpin for WsClientError
impl !UnwindSafe for WsClientError
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more