pub struct RetryLayer { /* private fields */ }Expand description
重试中间件 —— 指数退避 + 抖动,只重试 Transient 错误
Implementations§
Source§impl RetryLayer
impl RetryLayer
pub fn new(strategy: RetryStrategy) -> Self
Trait Implementations§
Source§impl Default for RetryLayer
impl Default for RetryLayer
Source§impl<S: LlmProvider + 'static> ProviderLayer<S> for RetryLayer
impl<S: LlmProvider + 'static> ProviderLayer<S> for RetryLayer
Auto Trait Implementations§
impl Freeze for RetryLayer
impl RefUnwindSafe for RetryLayer
impl Send for RetryLayer
impl Sync for RetryLayer
impl Unpin for RetryLayer
impl UnsafeUnpin for RetryLayer
impl UnwindSafe for RetryLayer
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