pub struct IfFlags { /* private fields */ }
Expand description
Network device flags.
Implementations
sourceimpl IfFlags
impl IfFlags
sourcepub const WIRELESS: IfFlags = _
pub const WIRELESS: IfFlags = _
Set if the device is a wireless interface; this includes IrDA as well as radio-based networks such as IEEE 802.15.4 and IEEE 802.11, so it doesn’t just mean Wi-Fi
sourcepub fn from_bits(bits: u32) -> Option<IfFlags>
pub fn from_bits(bits: u32) -> Option<IfFlags>
Convert from underlying bit representation, unless that representation contains bits that do not correspond to a flag.
sourcepub const fn from_bits_truncate(bits: u32) -> IfFlags
pub const fn from_bits_truncate(bits: u32) -> IfFlags
Convert from underlying bit representation, dropping any bits that do not correspond to flags.
sourcepub const unsafe fn from_bits_unchecked(bits: u32) -> IfFlags
pub const unsafe fn from_bits_unchecked(bits: u32) -> IfFlags
Convert from underlying bit representation, preserving all bits (even those not corresponding to a defined flag).
sourcepub const fn intersects(&self, other: IfFlags) -> bool
pub const fn intersects(&self, other: IfFlags) -> bool
Returns true
if there are flags common to both self
and other
.
Trait Implementations
sourceimpl BitAndAssign<IfFlags> for IfFlags
impl BitAndAssign<IfFlags> for IfFlags
sourcefn bitand_assign(&mut self, other: IfFlags)
fn bitand_assign(&mut self, other: IfFlags)
Disables all flags disabled in the set.
sourceimpl BitOrAssign<IfFlags> for IfFlags
impl BitOrAssign<IfFlags> for IfFlags
sourcefn bitor_assign(&mut self, other: IfFlags)
fn bitor_assign(&mut self, other: IfFlags)
Adds the set of flags.
sourceimpl BitXorAssign<IfFlags> for IfFlags
impl BitXorAssign<IfFlags> for IfFlags
sourcefn bitxor_assign(&mut self, other: IfFlags)
fn bitxor_assign(&mut self, other: IfFlags)
Toggles the set of flags.
sourceimpl Extend<IfFlags> for IfFlags
impl Extend<IfFlags> for IfFlags
sourcefn extend<T: IntoIterator<Item = IfFlags>>(&mut self, iterator: T)
fn extend<T: IntoIterator<Item = IfFlags>>(&mut self, iterator: T)
Extends a collection with the contents of an iterator. Read more
sourcefn extend_one(&mut self, item: A)
fn extend_one(&mut self, item: A)
🔬This is a nightly-only experimental API. (
extend_one
)Extends a collection with exactly one element.
sourcefn extend_reserve(&mut self, additional: usize)
fn extend_reserve(&mut self, additional: usize)
🔬This is a nightly-only experimental API. (
extend_one
)Reserves capacity in a collection for the given number of additional elements. Read more
sourceimpl FromIterator<IfFlags> for IfFlags
impl FromIterator<IfFlags> for IfFlags
sourceimpl Ord for IfFlags
impl Ord for IfFlags
1.21.0 · sourcefn max(self, other: Self) -> Self
fn max(self, other: Self) -> Self
Compares and returns the maximum of two values. Read more
1.21.0 · sourcefn min(self, other: Self) -> Self
fn min(self, other: Self) -> Self
Compares and returns the minimum of two values. Read more
1.50.0 · sourcefn clamp(self, min: Self, max: Self) -> Selfwhere
Self: PartialOrd<Self>,
fn clamp(self, min: Self, max: Self) -> Selfwhere
Self: PartialOrd<Self>,
Restrict a value to a certain interval. Read more
sourceimpl PartialOrd<IfFlags> for IfFlags
impl PartialOrd<IfFlags> for IfFlags
sourcefn partial_cmp(&self, other: &IfFlags) -> Option<Ordering>
fn partial_cmp(&self, other: &IfFlags) -> Option<Ordering>
1.0.0 · sourcefn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moresourceimpl SubAssign<IfFlags> for IfFlags
impl SubAssign<IfFlags> for IfFlags
sourcefn sub_assign(&mut self, other: IfFlags)
fn sub_assign(&mut self, other: IfFlags)
Disables all flags enabled in the set.
impl Copy for IfFlags
impl Eq for IfFlags
impl StructuralEq for IfFlags
impl StructuralPartialEq for IfFlags
Auto Trait Implementations
impl RefUnwindSafe for IfFlags
impl Send for IfFlags
impl Sync for IfFlags
impl Unpin for IfFlags
impl UnwindSafe for IfFlags
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more