pub enum Family {
Inet,
Inet6,
IpX,
Can,
}
Expand description
Represents the address family in the interfaces(5)
file.
The Family
enum constrains the family
field to allowed values, ensuring
that only valid address families are used.
§Variants
Inet
: Represents theinet
family (IPv4).Inet6
: Represents theinet6
family (IPv6).IpX
: Represents theipx
family.Can
: Represents thecan
family.
§Examples
Parsing a Family
from a string:
use interface_rs::interface::Family;
use std::str::FromStr;
let family = Family::from_str("inet").unwrap();
assert_eq!(family, Family::Inet);
Variants§
Inet
The inet
address family (IPv4).
Inet6
The inet6
address family (IPv6).
IpX
The ipx
address family.
Can
The can
address family.
Trait Implementations§
impl StructuralPartialEq for Family
Auto Trait Implementations§
impl Freeze for Family
impl RefUnwindSafe for Family
impl Send for Family
impl Sync for Family
impl Unpin for Family
impl UnwindSafe for Family
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