Struct discv5::permit_ban::PermitBanList
source · pub struct PermitBanList {
pub permit_ips: HashSet<IpAddr>,
pub ban_ips: HashMap<IpAddr, Option<Instant>>,
pub permit_nodes: HashSet<NodeId>,
pub ban_nodes: HashMap<NodeId, Option<Instant>>,
}
Fields§
§permit_ips: HashSet<IpAddr>
A set of IPs which pass all filters.
ban_ips: HashMap<IpAddr, Option<Instant>>
A set of IPs whose packets get dropped instantly.
permit_nodes: HashSet<NodeId>
A set of NodeIds which pass all filters.
ban_nodes: HashMap<NodeId, Option<Instant>>
A set of NodeIds whose packets get dropped instantly.
Implementations§
source§impl PermitBanList
impl PermitBanList
pub fn ban(&mut self, node_address: NodeAddress, time_to_unban: Option<Instant>)
Trait Implementations§
source§impl Clone for PermitBanList
impl Clone for PermitBanList
source§fn clone(&self) -> PermitBanList
fn clone(&self) -> PermitBanList
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for PermitBanList
impl Debug for PermitBanList
source§impl Default for PermitBanList
impl Default for PermitBanList
source§fn default() -> PermitBanList
fn default() -> PermitBanList
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for PermitBanList
impl RefUnwindSafe for PermitBanList
impl Send for PermitBanList
impl Sync for PermitBanList
impl Unpin for PermitBanList
impl UnwindSafe for PermitBanList
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