pub struct LinkFlags(pub Vec<String>);Expand description
IFF_* style flags as reported by the kernel. Stored as strings to avoid a brittle enum; query via helper methods.
Tuple Fields§
§0: Vec<String>Implementations§
Source§impl LinkFlags
impl LinkFlags
Sourcepub fn has(&self, flag: &str) -> bool
pub fn has(&self, flag: &str) -> bool
Return true if the given flag name is present (case-insensitive).
Sourcepub fn is_loopback(&self) -> bool
pub fn is_loopback(&self) -> bool
Return true when IFF_LOOPBACK is set.
Sourcepub fn no_carrier(&self) -> bool
pub fn no_carrier(&self) -> bool
Return true when the link is administratively up but has no carrier.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for LinkFlags
impl<'de> Deserialize<'de> for LinkFlags
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for LinkFlags
impl StructuralPartialEq for LinkFlags
Auto Trait Implementations§
impl Freeze for LinkFlags
impl RefUnwindSafe for LinkFlags
impl Send for LinkFlags
impl Sync for LinkFlags
impl Unpin for LinkFlags
impl UnsafeUnpin for LinkFlags
impl UnwindSafe for LinkFlags
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