pub struct TcpBindFlags { /* private fields */ }
Expand description
Flags to TcpHandle::bind()
Implementations§
source§impl TcpBindFlags
impl TcpBindFlags
sourcepub const IPV6ONLY: TcpBindFlags = _
pub const IPV6ONLY: TcpBindFlags = _
Dual-stack support is disabled and only IPv6 is used.
sourcepub const fn empty() -> TcpBindFlags
pub const fn empty() -> TcpBindFlags
Returns an empty set of flags
sourcepub const fn all() -> TcpBindFlags
pub const fn all() -> TcpBindFlags
Returns the set containing all flags.
sourcepub fn from_bits(bits: u32) -> Option<TcpBindFlags>
pub fn from_bits(bits: u32) -> Option<TcpBindFlags>
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) -> TcpBindFlags
pub const fn from_bits_truncate(bits: u32) -> TcpBindFlags
Convert from underlying bit representation, dropping any bits that do not correspond to flags.
sourcepub const unsafe fn from_bits_unchecked(bits: u32) -> TcpBindFlags
pub const unsafe fn from_bits_unchecked(bits: u32) -> TcpBindFlags
Convert from underlying bit representation, preserving all bits (even those not corresponding to a defined flag).
sourcepub const fn intersects(&self, other: TcpBindFlags) -> bool
pub const fn intersects(&self, other: TcpBindFlags) -> bool
Returns true
if there are flags common to both self
and other
.
sourcepub const fn contains(&self, other: TcpBindFlags) -> bool
pub const fn contains(&self, other: TcpBindFlags) -> bool
Returns true
all of the flags in other
are contained within self
.
sourcepub fn insert(&mut self, other: TcpBindFlags)
pub fn insert(&mut self, other: TcpBindFlags)
Inserts the specified flags in-place.
sourcepub fn remove(&mut self, other: TcpBindFlags)
pub fn remove(&mut self, other: TcpBindFlags)
Removes the specified flags in-place.
sourcepub fn toggle(&mut self, other: TcpBindFlags)
pub fn toggle(&mut self, other: TcpBindFlags)
Toggles the specified flags in-place.
sourcepub fn set(&mut self, other: TcpBindFlags, value: bool)
pub fn set(&mut self, other: TcpBindFlags, value: bool)
Inserts or removes the specified flags depending on the passed value.
Trait Implementations§
source§impl Binary for TcpBindFlags
impl Binary for TcpBindFlags
source§impl BitAnd for TcpBindFlags
impl BitAnd for TcpBindFlags
source§fn bitand(self, other: TcpBindFlags) -> TcpBindFlags
fn bitand(self, other: TcpBindFlags) -> TcpBindFlags
Returns the intersection between the two sets of flags.
§type Output = TcpBindFlags
type Output = TcpBindFlags
&
operator.source§impl BitAndAssign for TcpBindFlags
impl BitAndAssign for TcpBindFlags
source§fn bitand_assign(&mut self, other: TcpBindFlags)
fn bitand_assign(&mut self, other: TcpBindFlags)
Disables all flags disabled in the set.
source§impl BitOr for TcpBindFlags
impl BitOr for TcpBindFlags
source§fn bitor(self, other: TcpBindFlags) -> TcpBindFlags
fn bitor(self, other: TcpBindFlags) -> TcpBindFlags
Returns the union of the two sets of flags.
§type Output = TcpBindFlags
type Output = TcpBindFlags
|
operator.source§impl BitOrAssign for TcpBindFlags
impl BitOrAssign for TcpBindFlags
source§fn bitor_assign(&mut self, other: TcpBindFlags)
fn bitor_assign(&mut self, other: TcpBindFlags)
Adds the set of flags.
source§impl BitXor for TcpBindFlags
impl BitXor for TcpBindFlags
source§fn bitxor(self, other: TcpBindFlags) -> TcpBindFlags
fn bitxor(self, other: TcpBindFlags) -> TcpBindFlags
Returns the left flags, but with all the right flags toggled.
§type Output = TcpBindFlags
type Output = TcpBindFlags
^
operator.source§impl BitXorAssign for TcpBindFlags
impl BitXorAssign for TcpBindFlags
source§fn bitxor_assign(&mut self, other: TcpBindFlags)
fn bitxor_assign(&mut self, other: TcpBindFlags)
Toggles the set of flags.
source§impl Clone for TcpBindFlags
impl Clone for TcpBindFlags
source§fn clone(&self) -> TcpBindFlags
fn clone(&self) -> TcpBindFlags
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for TcpBindFlags
impl Debug for TcpBindFlags
source§impl Extend<TcpBindFlags> for TcpBindFlags
impl Extend<TcpBindFlags> for TcpBindFlags
source§fn extend<T: IntoIterator<Item = TcpBindFlags>>(&mut self, iterator: T)
fn extend<T: IntoIterator<Item = TcpBindFlags>>(&mut self, iterator: T)
source§fn extend_one(&mut self, item: A)
fn extend_one(&mut self, item: A)
extend_one
)source§fn extend_reserve(&mut self, additional: usize)
fn extend_reserve(&mut self, additional: usize)
extend_one
)source§impl FromIterator<TcpBindFlags> for TcpBindFlags
impl FromIterator<TcpBindFlags> for TcpBindFlags
source§fn from_iter<T: IntoIterator<Item = TcpBindFlags>>(iterator: T) -> TcpBindFlags
fn from_iter<T: IntoIterator<Item = TcpBindFlags>>(iterator: T) -> TcpBindFlags
source§impl Hash for TcpBindFlags
impl Hash for TcpBindFlags
source§impl LowerHex for TcpBindFlags
impl LowerHex for TcpBindFlags
source§impl Not for TcpBindFlags
impl Not for TcpBindFlags
source§fn not(self) -> TcpBindFlags
fn not(self) -> TcpBindFlags
Returns the complement of this set of flags.
§type Output = TcpBindFlags
type Output = TcpBindFlags
!
operator.source§impl Octal for TcpBindFlags
impl Octal for TcpBindFlags
source§impl Ord for TcpBindFlags
impl Ord for TcpBindFlags
source§fn cmp(&self, other: &TcpBindFlags) -> Ordering
fn cmp(&self, other: &TcpBindFlags) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
source§impl PartialEq for TcpBindFlags
impl PartialEq for TcpBindFlags
source§fn eq(&self, other: &TcpBindFlags) -> bool
fn eq(&self, other: &TcpBindFlags) -> bool
self
and other
values to be equal, and is used
by ==
.source§impl PartialOrd for TcpBindFlags
impl PartialOrd for TcpBindFlags
source§fn partial_cmp(&self, other: &TcpBindFlags) -> Option<Ordering>
fn partial_cmp(&self, other: &TcpBindFlags) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
self
and other
) and is used by the <=
operator. Read moresource§impl Sub for TcpBindFlags
impl Sub for TcpBindFlags
source§fn sub(self, other: TcpBindFlags) -> TcpBindFlags
fn sub(self, other: TcpBindFlags) -> TcpBindFlags
Returns the set difference of the two sets of flags.
§type Output = TcpBindFlags
type Output = TcpBindFlags
-
operator.source§impl SubAssign for TcpBindFlags
impl SubAssign for TcpBindFlags
source§fn sub_assign(&mut self, other: TcpBindFlags)
fn sub_assign(&mut self, other: TcpBindFlags)
Disables all flags enabled in the set.