pub struct ClientError {
pub code: ErrorCode,
pub detail: String,
}Expand description
A failure of the client: the code of the error envelope a mesh would give for it, and why.
Fields§
§code: ErrorCodeE_INPUT_UNAVAILABLE (the other mesh is down, answered otherwise, or is not allowed),
E_MESH_DOC, E_KEY_UNAVAILABLE or E_KEY_DOC (resolving its host), E_ENVELOPE (an
answer that fails the check), or what checking a receipt gave.
detail: StringWhy.
Implementations§
Source§impl ClientError
impl ClientError
Sourcepub fn foreign_detail(&self) -> Option<ForeignDetail>
pub fn foreign_detail(&self) -> Option<ForeignDetail>
For E_FOREIGN_UNAVAILABLE (spec-0.4.3), the envelope’s detail (offline, network,
dns, tls, timeout, refused): the start of ClientError::detail. None for
every other code. Since 0.2.1.
Trait Implementations§
Source§impl Clone for ClientError
impl Clone for ClientError
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
1.30.0 · 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 Forget for ClientError
impl Freeze for ClientError
impl Move 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§
impl<T> Allocation 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