pub struct HostAllowlist {
pub allowed: HashSet<String>,
pub denied: HashSet<String>,
}Expand description
Allowlist for network hosts.
Fields§
§allowed: HashSet<String>Allowed hosts.
denied: HashSet<String>Denied hosts.
Implementations§
Source§impl HostAllowlist
impl HostAllowlist
Sourcepub fn can_access(&self, host: &str) -> bool
pub fn can_access(&self, host: &str) -> bool
Check if a host is allowed.
Trait Implementations§
Source§impl Clone for HostAllowlist
impl Clone for HostAllowlist
Source§fn clone(&self) -> HostAllowlist
fn clone(&self) -> HostAllowlist
Returns a duplicate 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 HostAllowlist
impl Debug for HostAllowlist
Source§impl Default for HostAllowlist
impl Default for HostAllowlist
Source§fn default() -> HostAllowlist
fn default() -> HostAllowlist
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for HostAllowlist
impl RefUnwindSafe for HostAllowlist
impl Send for HostAllowlist
impl Sync for HostAllowlist
impl Unpin for HostAllowlist
impl UnwindSafe for HostAllowlist
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