#[non_exhaustive]pub enum IfKind {
All,
IPv4,
IPv6,
Name(String),
Addr(IpAddr),
}Expand description
Specify kinds of interfaces. It is used to enable or to disable interfaces in the daemon.
Note that for ergonomic reasons, From<&str> and From<IpAddr> are implemented.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
All
All interfaces.
IPv4
All IPv4 interfaces.
IPv6
All IPv6 interfaces.
Name(String)
By the interface name, for example “en0”
Addr(IpAddr)
By an IPv4 or IPv6 address.
Trait Implementations§
Auto Trait Implementations§
impl RefUnwindSafe for IfKind
impl Send for IfKind
impl Sync for IfKind
impl Unpin for IfKind
impl UnwindSafe for IfKind
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