pub enum ClientError {
WebSocketFailure(CoreError),
BadResponse(BadResponseError),
}Available on crate feature
websocket only.Expand description
See crate::client_api::AllowUndocumentedResponses if you don’t want to trigger an error when
you receive undocumeted responses(you usually receive undocumented responses when your
simplex-chat server version is not compatible with the simploxide-client version. Keep an eye
on the
Version compatability table
)
Variants§
WebSocketFailure(CoreError)
Critical error signalling that the web socket connection is dropped for some reason. You will have to reconnect to the SimpleX server to recover from this one.
BadResponse(BadResponseError)
SimpleX command error or unexpected(undocumented) response.
Trait Implementations§
Source§impl ClientApiError for ClientError
impl ClientApiError for ClientError
Source§fn bad_response(&self) -> Option<&BadResponseError>
fn bad_response(&self) -> Option<&BadResponseError>
If current error is a bad response error return a reference to it
Source§fn bad_response_mut(&mut self) -> Option<&mut BadResponseError>
fn bad_response_mut(&mut self) -> Option<&mut BadResponseError>
If current error is a bad response error return a mut reference to it
Source§impl Debug for ClientError
impl Debug for ClientError
Source§impl Display for ClientError
impl Display for ClientError
Source§impl Error for ClientError
impl Error for ClientError
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<BadResponseError> for ClientError
impl From<BadResponseError> for ClientError
Source§fn from(err: BadResponseError) -> Self
fn from(err: BadResponseError) -> Self
Converts to this type from the input type.
Source§impl From<ClientError> for BotInitError
impl From<ClientError> for BotInitError
Source§fn from(e: ClientError) -> Self
fn from(e: ClientError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for ClientError
impl !RefUnwindSafe for ClientError
impl Send for ClientError
impl Sync for ClientError
impl Unpin for ClientError
impl UnsafeUnpin for ClientError
impl !UnwindSafe for ClientError
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more