pub struct SocketType { /* private fields */ }
Implementations§
Source§impl SocketType
impl SocketType
Sourcepub fn empty() -> SocketType
pub fn empty() -> SocketType
Returns an empty set of flags.
Sourcepub fn all() -> SocketType
pub fn all() -> SocketType
Returns the set containing all flags.
Sourcepub fn from_bits(bits: c_int) -> Option<SocketType>
pub fn from_bits(bits: c_int) -> Option<SocketType>
Convert from underlying bit representation, unless that representation contains bits that do not correspond to a flag.
Sourcepub fn from_bits_truncate(bits: c_int) -> SocketType
pub fn from_bits_truncate(bits: c_int) -> SocketType
Convert from underlying bit representation, dropping any bits that do not correspond to flags.
Sourcepub fn intersects(&self, other: SocketType) -> bool
pub fn intersects(&self, other: SocketType) -> bool
Returns true
if there are flags common to both self
and other
.
Sourcepub fn contains(&self, other: SocketType) -> bool
pub fn contains(&self, other: SocketType) -> bool
Returns true
all of the flags in other
are contained within self
.
Sourcepub fn insert(&mut self, other: SocketType)
pub fn insert(&mut self, other: SocketType)
Inserts the specified flags in-place.
Sourcepub fn remove(&mut self, other: SocketType)
pub fn remove(&mut self, other: SocketType)
Removes the specified flags in-place.
Sourcepub fn toggle(&mut self, other: SocketType)
pub fn toggle(&mut self, other: SocketType)
Toggles the specified flags in-place.
Trait Implementations§
Source§impl BitAnd for SocketType
impl BitAnd for SocketType
Source§fn bitand(self, other: SocketType) -> SocketType
fn bitand(self, other: SocketType) -> SocketType
Returns the intersection between the two sets of flags.
Source§type Output = SocketType
type Output = SocketType
&
operator.Source§impl BitAndAssign for SocketType
impl BitAndAssign for SocketType
Source§fn bitand_assign(&mut self, other: SocketType)
fn bitand_assign(&mut self, other: SocketType)
Disables all flags disabled in the set.
Source§impl BitOr for SocketType
impl BitOr for SocketType
Source§fn bitor(self, other: SocketType) -> SocketType
fn bitor(self, other: SocketType) -> SocketType
Returns the union of the two sets of flags.
Source§type Output = SocketType
type Output = SocketType
|
operator.Source§impl BitOrAssign for SocketType
impl BitOrAssign for SocketType
Source§fn bitor_assign(&mut self, other: SocketType)
fn bitor_assign(&mut self, other: SocketType)
Adds the set of flags.
Source§impl BitXor for SocketType
impl BitXor for SocketType
Source§fn bitxor(self, other: SocketType) -> SocketType
fn bitxor(self, other: SocketType) -> SocketType
Returns the left flags, but with all the right flags toggled.
Source§type Output = SocketType
type Output = SocketType
^
operator.Source§impl BitXorAssign for SocketType
impl BitXorAssign for SocketType
Source§fn bitxor_assign(&mut self, other: SocketType)
fn bitxor_assign(&mut self, other: SocketType)
Toggles the set of flags.
Source§impl Clone for SocketType
impl Clone for SocketType
Source§fn clone(&self) -> SocketType
fn clone(&self) -> SocketType
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for SocketType
impl Debug for SocketType
Source§impl Extend<SocketType> for SocketType
impl Extend<SocketType> for SocketType
Source§fn extend<T: IntoIterator<Item = SocketType>>(&mut self, iterator: T)
fn extend<T: IntoIterator<Item = SocketType>>(&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<SocketType> for SocketType
impl FromIterator<SocketType> for SocketType
Source§fn from_iter<T: IntoIterator<Item = SocketType>>(iterator: T) -> SocketType
fn from_iter<T: IntoIterator<Item = SocketType>>(iterator: T) -> SocketType
Source§impl Hash for SocketType
impl Hash for SocketType
Source§impl Not for SocketType
impl Not for SocketType
Source§fn not(self) -> SocketType
fn not(self) -> SocketType
Returns the complement of this set of flags.
Source§type Output = SocketType
type Output = SocketType
!
operator.Source§impl Ord for SocketType
impl Ord for SocketType
Source§fn cmp(&self, other: &SocketType) -> Ordering
fn cmp(&self, other: &SocketType) -> 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 SocketType
impl PartialEq for SocketType
Source§impl PartialOrd for SocketType
impl PartialOrd for SocketType
Source§impl Sub for SocketType
impl Sub for SocketType
Source§fn sub(self, other: SocketType) -> SocketType
fn sub(self, other: SocketType) -> SocketType
Returns the set difference of the two sets of flags.
Source§type Output = SocketType
type Output = SocketType
-
operator.Source§impl SubAssign for SocketType
impl SubAssign for SocketType
Source§fn sub_assign(&mut self, other: SocketType)
fn sub_assign(&mut self, other: SocketType)
Disables all flags enabled in the set.