pub struct DefaultFallback { /* private fields */ }Expand description
默认 fallback 策略 — 可重试错误自动重试,其余直接终止。
Implementations§
Trait Implementations§
Source§impl Default for DefaultFallback
impl Default for DefaultFallback
Source§impl FallbackStrategy for DefaultFallback
impl FallbackStrategy for DefaultFallback
Source§fn handle<'life0, 'life1, 'async_trait>(
&'life0 self,
ctx: &'life1 FallbackContext<'_>,
) -> Pin<Box<dyn Future<Output = FallbackAction> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn handle<'life0, 'life1, 'async_trait>(
&'life0 self,
ctx: &'life1 FallbackContext<'_>,
) -> Pin<Box<dyn Future<Output = FallbackAction> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
处理降级信号,返回决策动作。
Auto Trait Implementations§
impl Freeze for DefaultFallback
impl RefUnwindSafe for DefaultFallback
impl Send for DefaultFallback
impl Sync for DefaultFallback
impl Unpin for DefaultFallback
impl UnsafeUnpin for DefaultFallback
impl UnwindSafe for DefaultFallback
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