pub struct IpFilter<S: IpType> {
pub addresses: DashMap<IpAddr, IpMetaData>,
pub networks: DashMap<IpNetwork, IpMetaData>,
pub mode: Mode,
/* private fields */
}Fields§
§addresses: DashMap<IpAddr, IpMetaData>§networks: DashMap<IpNetwork, IpMetaData>§mode: ModeImplementations§
Trait Implementations§
Source§impl NetworkFilter for IpFilter<V4>
impl NetworkFilter for IpFilter<V4>
fn block( &self, ip: impl IpAddrExt, network: bool, ) -> impl Future<Output = ()> + Send
fn unblock( &self, ip: impl IpAddrExt, network: bool, ) -> impl Future<Output = ()> + Send
fn is_blocked(&self, ip: impl IpAddrExt) -> impl Future<Output = bool> + Send
fn to_denied_response<T: Body>(&self) -> Response<IpResponseBody<T>>
Source§impl NetworkFilter for IpFilter<V6>
impl NetworkFilter for IpFilter<V6>
fn block( &self, ip: impl IpAddrExt, network: bool, ) -> impl Future<Output = ()> + Send
fn unblock( &self, ip: impl IpAddrExt, network: bool, ) -> impl Future<Output = ()> + Send
fn is_blocked(&self, ip: impl IpAddrExt) -> impl Future<Output = bool> + Send
fn to_denied_response<T: Body>(&self) -> Response<IpResponseBody<T>>
Auto Trait Implementations§
impl<S> Freeze for IpFilter<S>
impl<S> !RefUnwindSafe for IpFilter<S>
impl<S> Send for IpFilter<S>where
S: Send,
impl<S> Sync for IpFilter<S>where
S: Sync,
impl<S> Unpin for IpFilter<S>where
S: Unpin,
impl<S> UnwindSafe for IpFilter<S>where
S: UnwindSafe,
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