pub struct Failure {
pub code: String,
pub retryable: bool,
pub message: String,
}Expand description
A refused request: a stable code, whether retrying can help, and a message safe to hand back to the orchestrator.
retryable is the field an orchestrator actually branches on, so it
is computed rather than guessed. Getting it wrong in the safe-looking
direction is what hurts: a terminal failure marked retryable becomes
a scheduler spinning on a request that can never succeed.
Fields§
§code: StringStable machine-readable code.
retryable: boolWhether an identical retry could succeed later.
message: StringHuman-readable detail.
Implementations§
Trait Implementations§
impl Eq for Failure
impl StructuralPartialEq for Failure
Auto Trait Implementations§
impl Freeze for Failure
impl RefUnwindSafe for Failure
impl Send for Failure
impl Sync for Failure
impl Unpin for Failure
impl UnsafeUnpin for Failure
impl UnwindSafe for Failure
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