pub struct ResultDeliveryPolicy {
pub max_retries: u32,
}Expand description
业务作用:限制 result 普通瞬态重试次数,同时保留暂停与事务不确定的无限收敛语义。
Fields§
§max_retries: u32普通失败可重投的最大序号。
Implementations§
Source§impl ResultDeliveryPolicy
impl ResultDeliveryPolicy
Sourcepub fn decide(
self,
error: &Error,
retry_attempt: u32,
) -> ResultDeliveryDisposition
pub fn decide( self, error: &Error, retry_attempt: u32, ) -> ResultDeliveryDisposition
业务作用:结合失败类别与普通失败序号裁决 result 投递动作。
参数说明:
error:是完整错误链retry_attempt:是从一开始的普通失败序号。
返回:暂停、失权和事务不确定持续保留,普通失败超预算后隔离。
Trait Implementations§
Source§impl Clone for ResultDeliveryPolicy
impl Clone for ResultDeliveryPolicy
impl Copy for ResultDeliveryPolicy
Source§impl Debug for ResultDeliveryPolicy
impl Debug for ResultDeliveryPolicy
Source§impl Default for ResultDeliveryPolicy
impl Default for ResultDeliveryPolicy
impl Eq for ResultDeliveryPolicy
Source§impl PartialEq for ResultDeliveryPolicy
impl PartialEq for ResultDeliveryPolicy
impl StructuralPartialEq for ResultDeliveryPolicy
Auto Trait Implementations§
impl Forget for ResultDeliveryPolicy
impl Freeze for ResultDeliveryPolicy
impl Move for ResultDeliveryPolicy
impl RefUnwindSafe for ResultDeliveryPolicy
impl Send for ResultDeliveryPolicy
impl Sync for ResultDeliveryPolicy
impl Unpin for ResultDeliveryPolicy
impl UnsafeUnpin for ResultDeliveryPolicy
impl UnwindSafe for ResultDeliveryPolicy
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