pub struct ClientError<E: HandlerCode> {
pub code: ErrorCode<E>,
pub message: String,
}Expand description
The standard error type returned by client methods.
Fields§
§code: ErrorCode<E>The error code.
message: StringThe error message.
Implementations§
source§impl<E: HandlerCode> ClientError<E>
impl<E: HandlerCode> ClientError<E>
Trait Implementations§
source§impl<E: Clone + HandlerCode> Clone for ClientError<E>
impl<E: Clone + HandlerCode> Clone for ClientError<E>
source§fn clone(&self) -> ClientError<E>
fn clone(&self) -> ClientError<E>
Returns a copy 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<E: HandlerCode> Debug for ClientError<E>
impl<E: HandlerCode> Debug for ClientError<E>
source§impl<E: HandlerCode> Display for ClientError<E>
impl<E: HandlerCode> Display for ClientError<E>
source§impl<E: HandlerCode> Error for ClientError<E>
impl<E: HandlerCode> Error for ClientError<E>
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()
source§impl<E: HandlerCode> From<AllocError> for ClientError<E>
impl<E: HandlerCode> From<AllocError> for ClientError<E>
source§fn from(_: AllocError) -> Self
fn from(_: AllocError) -> Self
Converts to this type from the input type.
source§impl<E: HandlerCode> From<DecodeError> for ClientError<E>
impl<E: HandlerCode> From<DecodeError> for ClientError<E>
source§fn from(value: DecodeError) -> Self
fn from(value: DecodeError) -> Self
Converts to this type from the input type.
source§impl<E: HandlerCode> From<EncodeError> for ClientError<E>
impl<E: HandlerCode> From<EncodeError> for ClientError<E>
source§fn from(value: EncodeError) -> Self
fn from(value: EncodeError) -> Self
Converts to this type from the input type.
source§impl<E: HandlerCode> From<ErrorCode> for ClientError<E>
impl<E: HandlerCode> From<ErrorCode> for ClientError<E>
Auto Trait Implementations§
impl<E> Freeze for ClientError<E>where
E: Freeze,
impl<E> RefUnwindSafe for ClientError<E>where
E: RefUnwindSafe,
impl<E> Send for ClientError<E>where
E: Send,
impl<E> Sync for ClientError<E>where
E: Sync,
impl<E> Unpin for ClientError<E>where
E: Unpin,
impl<E> UnwindSafe for ClientError<E>where
E: UnwindSafe,
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit)