pub struct IpFilter { /* private fields */ }Expand description
Middleware that filters requests by client IPv4 address.
Constructed via IpFilter::allow or IpFilter::deny. Each entry
may be an exact address ("1.2.3.4") or a CIDR range ("10.0.0.0/8").
Malformed entries are silently skipped.
Implementations§
Source§impl IpFilter
impl IpFilter
Trait Implementations§
Source§impl Middleware for IpFilter
impl Middleware for IpFilter
fn handle( &self, request: &Request, connection: &ConnectionInfo, next: &dyn Application, ) -> Result<Response, String>
Auto Trait Implementations§
impl Freeze for IpFilter
impl RefUnwindSafe for IpFilter
impl Send for IpFilter
impl Sync for IpFilter
impl Unpin for IpFilter
impl UnsafeUnpin for IpFilter
impl UnwindSafe for IpFilter
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