pub struct ClientError { /* private fields */ }Expand description
Standard error returned from client operations.
Implementations§
Source§impl ClientError
impl ClientError
Sourcepub fn new(kind: ClientErrorKind, message: String) -> Self
pub fn new(kind: ClientErrorKind, message: String) -> Self
Construct a simple client error without source.
If you have an underlying error you want to include as the source, use ClientError::new_with_source instead.
Sourcepub fn new_with_source<S>(
kind: ClientErrorKind,
message: String,
source: Option<S>,
) -> Self
pub fn new_with_source<S>( kind: ClientErrorKind, message: String, source: Option<S>, ) -> Self
Construct a client error using an underlying error as the source.
Sourcepub fn kind(&self) -> ClientErrorKind
pub fn kind(&self) -> ClientErrorKind
Error kind accessor.
Trait Implementations§
Source§impl Clone for ClientError
impl Clone for ClientError
Source§fn clone(&self) -> ClientError
fn clone(&self) -> ClientError
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 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<T> From<ClientError> for ClientResult<T>
impl<T> From<ClientError> for ClientResult<T>
Source§fn from(error: ClientError) -> Self
fn from(error: ClientError) -> Self
Converts to this type from the input type.
Source§impl From<ClientError> for Vec<ClientError>
impl From<ClientError> for Vec<ClientError>
Source§fn from(error: ClientError) -> Self
fn from(error: 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 !UnwindSafe for ClientError
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<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
§impl<T> ToStringFallible for Twhere
T: Display,
impl<T> ToStringFallible for Twhere
T: Display,
§fn try_to_string(&self) -> Result<String, TryReserveError>
fn try_to_string(&self) -> Result<String, TryReserveError>
ToString::to_string, but without panic on OOM.