pub struct WriteSafetyError {
pub code: ErrorCode,
pub message: String,
pub status: u16,
pub retryable: bool,
pub reason: Option<&'static str>,
pub retry_after_ms: Option<i64>,
}Fields§
§code: ErrorCode§message: String§status: u16§retryable: bool§reason: Option<&'static str>§retry_after_ms: Option<i64>Implementations§
Source§impl WriteSafetyError
impl WriteSafetyError
pub fn new(code: ErrorCode, message: impl Into<String>) -> Self
pub fn with_retryable(self, retryable: bool) -> Self
pub fn with_reason(self, reason: &'static str) -> Self
Sourcepub fn before_effect(self) -> HandlerError<Self>
pub fn before_effect(self) -> HandlerError<Self>
Mark a handler error only when no external side effect was attempted.
Trait Implementations§
Source§impl Clone for WriteSafetyError
impl Clone for WriteSafetyError
Source§impl Debug for WriteSafetyError
impl Debug for WriteSafetyError
Source§impl Display for WriteSafetyError
impl Display for WriteSafetyError
impl Eq for WriteSafetyError
Source§impl Error for WriteSafetyError
impl Error for WriteSafetyError
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 PartialEq for WriteSafetyError
impl PartialEq for WriteSafetyError
impl StructuralPartialEq for WriteSafetyError
Auto Trait Implementations§
impl Forget for WriteSafetyError
impl Freeze for WriteSafetyError
impl Move for WriteSafetyError
impl RefUnwindSafe for WriteSafetyError
impl Send for WriteSafetyError
impl Sync for WriteSafetyErrorwhere
RawVecInner: Sync,
impl Unpin for WriteSafetyError
impl UnsafeUnpin for WriteSafetyError
impl UnwindSafe for WriteSafetyError
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