Struct x11rb_protocol::protocol::xproto::ButtonMask
source · pub struct ButtonMask(/* private fields */);
Implementations§
source§impl ButtonMask
impl ButtonMask
source§impl ButtonMask
impl ButtonMask
sourcepub fn contains(self, flag: impl Into<u16>) -> bool
pub fn contains(self, flag: impl Into<u16>) -> bool
Check if this object has all bits set that are also set in flag
.
flag
can be a single enum variant or a whole other mask.
sourcepub fn intersects(self, flag: impl Into<u16>) -> bool
pub fn intersects(self, flag: impl Into<u16>) -> bool
Check if this object has some bits set that are also set in flag
.
flag
can be a single enum variant or a whole other mask.
Trait Implementations§
source§impl BitAnd<ButtonMask> for u16
impl BitAnd<ButtonMask> for u16
§type Output = ButtonMask
type Output = ButtonMask
The resulting type after applying the
&
operator.source§impl BitAnd<u16> for ButtonMask
impl BitAnd<u16> for ButtonMask
source§impl BitAnd for ButtonMask
impl BitAnd for ButtonMask
source§impl BitAndAssign<ButtonMask> for u16
impl BitAndAssign<ButtonMask> for u16
source§fn bitand_assign(&mut self, other: ButtonMask)
fn bitand_assign(&mut self, other: ButtonMask)
Performs the
&=
operation. Read moresource§impl BitAndAssign<u16> for ButtonMask
impl BitAndAssign<u16> for ButtonMask
source§fn bitand_assign(&mut self, other: u16)
fn bitand_assign(&mut self, other: u16)
Performs the
&=
operation. Read moresource§impl BitAndAssign for ButtonMask
impl BitAndAssign for ButtonMask
source§fn bitand_assign(&mut self, other: ButtonMask)
fn bitand_assign(&mut self, other: ButtonMask)
Performs the
&=
operation. Read moresource§impl BitOr<ButtonMask> for u16
impl BitOr<ButtonMask> for u16
§type Output = ButtonMask
type Output = ButtonMask
The resulting type after applying the
|
operator.source§impl BitOr<u16> for ButtonMask
impl BitOr<u16> for ButtonMask
source§impl BitOr for ButtonMask
impl BitOr for ButtonMask
source§impl BitOrAssign<ButtonMask> for u16
impl BitOrAssign<ButtonMask> for u16
source§fn bitor_assign(&mut self, other: ButtonMask)
fn bitor_assign(&mut self, other: ButtonMask)
Performs the
|=
operation. Read moresource§impl BitOrAssign<u16> for ButtonMask
impl BitOrAssign<u16> for ButtonMask
source§fn bitor_assign(&mut self, other: u16)
fn bitor_assign(&mut self, other: u16)
Performs the
|=
operation. Read moresource§impl BitOrAssign for ButtonMask
impl BitOrAssign for ButtonMask
source§fn bitor_assign(&mut self, other: ButtonMask)
fn bitor_assign(&mut self, other: ButtonMask)
Performs the
|=
operation. Read moresource§impl Clone for ButtonMask
impl Clone for ButtonMask
source§fn clone(&self) -> ButtonMask
fn clone(&self) -> ButtonMask
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for ButtonMask
impl Debug for ButtonMask
source§impl Default for ButtonMask
impl Default for ButtonMask
source§fn default() -> ButtonMask
fn default() -> ButtonMask
Returns the “default value” for a type. Read more
source§impl<'de> Deserialize<'de> for ButtonMask
impl<'de> Deserialize<'de> for ButtonMask
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
source§impl From<ButtonMask> for Option<u16>
impl From<ButtonMask> for Option<u16>
source§fn from(input: ButtonMask) -> Self
fn from(input: ButtonMask) -> Self
Converts to this type from the input type.
source§impl From<ButtonMask> for Option<u32>
impl From<ButtonMask> for Option<u32>
source§fn from(input: ButtonMask) -> Self
fn from(input: ButtonMask) -> Self
Converts to this type from the input type.
source§impl From<ButtonMask> for u16
impl From<ButtonMask> for u16
source§fn from(input: ButtonMask) -> Self
fn from(input: ButtonMask) -> Self
Converts to this type from the input type.
source§impl From<ButtonMask> for u32
impl From<ButtonMask> for u32
source§fn from(input: ButtonMask) -> Self
fn from(input: ButtonMask) -> Self
Converts to this type from the input type.
source§impl From<u16> for ButtonMask
impl From<u16> for ButtonMask
source§impl From<u8> for ButtonMask
impl From<u8> for ButtonMask
source§impl Hash for ButtonMask
impl Hash for ButtonMask
source§impl Ord for ButtonMask
impl Ord for ButtonMask
source§fn cmp(&self, other: &ButtonMask) -> Ordering
fn cmp(&self, other: &ButtonMask) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
source§impl PartialEq for ButtonMask
impl PartialEq for ButtonMask
source§fn eq(&self, other: &ButtonMask) -> bool
fn eq(&self, other: &ButtonMask) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl PartialOrd for ButtonMask
impl PartialOrd for ButtonMask
source§fn partial_cmp(&self, other: &ButtonMask) -> Option<Ordering>
fn partial_cmp(&self, other: &ButtonMask) -> Option<Ordering>
1.0.0 · source§fn 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 moresource§impl Serialize for ButtonMask
impl Serialize for ButtonMask
impl Copy for ButtonMask
impl Eq for ButtonMask
impl StructuralPartialEq for ButtonMask
Auto Trait Implementations§
impl Freeze for ButtonMask
impl RefUnwindSafe for ButtonMask
impl Send for ButtonMask
impl Sync for ButtonMask
impl Unpin for ButtonMask
impl UnwindSafe for ButtonMask
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