pub enum ClientErrorKind {
Network,
Response,
Format,
Unknown,
}Expand description
The standard error kinds a client implementatiin should facilitate.
Variants§
Network
The network connection could not be established properly or was lost.
Response
The connection could be established, but the remote server/peer gave us an error.
Example: On a centralized HTTP server, this would happen when it returns an HTTP error code.
Format
The remote server/peer returned a successful response, but we can’t parse its content.
Example: When working with JSON APIs, this can happen when the schema of the JSON response is not what we expected or is not JSON at all.
Unknown
A kind of error that is not contemplated by MolyKit at the client layer.
Implementations§
Source§impl ClientErrorKind
impl ClientErrorKind
pub fn to_human_readable(&self) -> &str
Trait Implementations§
Source§impl Clone for ClientErrorKind
impl Clone for ClientErrorKind
Source§fn clone(&self) -> ClientErrorKind
fn clone(&self) -> ClientErrorKind
Returns a duplicate of the value. Read more
1.0.0 · 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 ClientErrorKind
impl Debug for ClientErrorKind
Source§impl Hash for ClientErrorKind
impl Hash for ClientErrorKind
Source§impl PartialEq for ClientErrorKind
impl PartialEq for ClientErrorKind
impl Copy for ClientErrorKind
impl Eq for ClientErrorKind
impl StructuralPartialEq for ClientErrorKind
Auto Trait Implementations§
impl Freeze for ClientErrorKind
impl RefUnwindSafe for ClientErrorKind
impl Send for ClientErrorKind
impl Sync for ClientErrorKind
impl Unpin for ClientErrorKind
impl UnwindSafe for ClientErrorKind
Blanket Implementations§
§impl<T> ActionTrait for T
impl<T> ActionTrait for T
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.