pub struct ClassifiedError {
pub kind: ErrorKind,
pub status_code: Option<u16>,
pub message: String,
pub is_retryable: bool,
pub retry_after_ms: Option<u64>,
}Expand description
Classified error with retry information
Fields§
§kind: ErrorKind§status_code: Option<u16>§message: String§is_retryable: bool§retry_after_ms: Option<u64>Implementations§
Source§impl ClassifiedError
impl ClassifiedError
pub fn from_status_code(status_code: u16, message: String) -> Self
pub fn timeout(message: String) -> Self
pub fn with_retry_after(self, retry_after_ms: u64) -> Self
Sourcepub fn to_error_code(&self) -> ErrorCode
pub fn to_error_code(&self) -> ErrorCode
Convert to ErrorCode for protocol
Trait Implementations§
Source§impl Debug for ClassifiedError
impl Debug for ClassifiedError
Source§impl Display for ClassifiedError
impl Display for ClassifiedError
Source§impl Error for ClassifiedError
impl Error for ClassifiedError
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 Freeze for ClassifiedError
impl RefUnwindSafe for ClassifiedError
impl Send for ClassifiedError
impl Sync for ClassifiedError
impl Unpin for ClassifiedError
impl UnwindSafe for ClassifiedError
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