#[non_exhaustive]pub struct TypeSafeError { /* private fields */ }Expand description
The root error type returned by all SDK operations.
Wraps an ErrorKind with an optional request ID (from the
x-typesafe-request-id response header) for correlating errors with
server-side logs.
Implementations§
Source§impl TypeSafeError
impl TypeSafeError
Sourcepub fn with_request_id(kind: ErrorKind, request_id: Option<String>) -> Self
pub fn with_request_id(kind: ErrorKind, request_id: Option<String>) -> Self
Create a new error from a kind and an optional request ID.
Sourcepub fn request_id(&self) -> Option<&str>
pub fn request_id(&self) -> Option<&str>
Returns the request ID associated with this error, if the server
provided one via the x-typesafe-request-id header.
Sourcepub fn is_retryable(&self) -> bool
pub fn is_retryable(&self) -> bool
Returns true if this error is retryable. Delegates to
ErrorKind::is_retryable.
Trait Implementations§
Source§impl Debug for TypeSafeError
impl Debug for TypeSafeError
Source§impl Display for TypeSafeError
impl Display for TypeSafeError
Source§impl Error for TypeSafeError
impl Error for TypeSafeError
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 From<Error> for TypeSafeError
impl From<Error> for TypeSafeError
Auto Trait Implementations§
impl !RefUnwindSafe for TypeSafeError
impl !UnwindSafe for TypeSafeError
impl Forget for TypeSafeError
impl Freeze for TypeSafeError
impl Move for TypeSafeError
impl Send for TypeSafeError
impl Sync for TypeSafeError
impl Unpin for TypeSafeError
impl UnsafeUnpin for TypeSafeError
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