pub struct MaintenanceLayer;Expand description
Middleware that returns 503 when MAINTENANCE_MODE is true.
Health probe paths (/healthz, /readyz) always pass through so that
load balancers can still detect the pod is alive.
Trait Implementations§
Source§impl Middleware for MaintenanceLayer
impl Middleware for MaintenanceLayer
fn handle( &self, request: &Request, connection: &ConnectionInfo, next: &dyn Application, ) -> Result<Response, String>
Auto Trait Implementations§
impl Freeze for MaintenanceLayer
impl RefUnwindSafe for MaintenanceLayer
impl Send for MaintenanceLayer
impl Sync for MaintenanceLayer
impl Unpin for MaintenanceLayer
impl UnsafeUnpin for MaintenanceLayer
impl UnwindSafe for MaintenanceLayer
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