pub struct RecoveryMiddleware { /* private fields */ }Expand description
Recovery middleware - integrates circuit breaker and fallback
Implementations§
Source§impl RecoveryMiddleware
impl RecoveryMiddleware
pub fn new() -> Self
pub fn with_circuit_breaker(self, config: CircuitBreakerConfig) -> Self
pub fn error_tracker(&self) -> Arc<ErrorTracker>
Trait Implementations§
Source§impl Default for RecoveryMiddleware
impl Default for RecoveryMiddleware
Source§impl Middleware for RecoveryMiddleware
impl Middleware for RecoveryMiddleware
Source§fn before<'life0, 'async_trait>(
&'life0 self,
request: Value,
) -> Pin<Box<dyn Future<Output = Result<Value>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn before<'life0, 'async_trait>(
&'life0 self,
request: Value,
) -> Pin<Box<dyn Future<Output = Result<Value>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Process request before handler execution
Returns modified request or error
Auto Trait Implementations§
impl Freeze for RecoveryMiddleware
impl !RefUnwindSafe for RecoveryMiddleware
impl Send for RecoveryMiddleware
impl Sync for RecoveryMiddleware
impl Unpin for RecoveryMiddleware
impl !UnwindSafe for RecoveryMiddleware
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