pub struct IpFilter { /* private fields */ }Expand description
IP allow/deny filter with CIDR support and hot-reload.
Implementations§
Source§impl IpFilter
impl IpFilter
pub fn new(config: IpFilterConfig) -> Self
Sourcepub fn reload(&self, config: IpFilterConfig)
pub fn reload(&self, config: IpFilterConfig)
Hot-reload with a new configuration.
Sourcepub fn check(&self, ip: IpAddr) -> Option<WafDecision>
pub fn check(&self, ip: IpAddr) -> Option<WafDecision>
Returns Some(Block) if the IP should be denied, None if allowed to proceed.
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