pub trait FallbackStrategy: Send + Sync {
// Required method
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;
}Expand description
Fallback 策略 trait — 可注入的恢复决策点。
Required Methods§
Sourcefn 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,
处理降级信号,返回决策动作。
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".