pub struct BlocklistLayer;Expand description
Middleware that checks each request’s client IP against global().
Blocked IPs receive 403 Forbidden. All other requests pass through
to the next layer.
Trait Implementations§
Source§impl Middleware for BlocklistLayer
impl Middleware for BlocklistLayer
fn handle( &self, request: &Request, connection: &ConnectionInfo, next: &dyn Application, ) -> Result<Response, String>
Auto Trait Implementations§
impl Freeze for BlocklistLayer
impl RefUnwindSafe for BlocklistLayer
impl Send for BlocklistLayer
impl Sync for BlocklistLayer
impl Unpin for BlocklistLayer
impl UnsafeUnpin for BlocklistLayer
impl UnwindSafe for BlocklistLayer
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