Struct dbsdk_rs::gamepad::GamepadButtonMask
source · #[repr(C)]pub struct GamepadButtonMask { /* private fields */ }Implementations§
source§impl GamepadButtonMask
impl GamepadButtonMask
sourcepub fn set<T>(&mut self, other: T)where
T: Into<GamepadButtonMask> + Deref<Target = u16>,
pub fn set<T>(&mut self, other: T)where T: Into<GamepadButtonMask> + Deref<Target = u16>,
Set all other flags.
other can be either a single flag or another mask.
sourcepub fn unset<T>(&mut self, other: T)where
T: Into<GamepadButtonMask> + Deref<Target = u16>,
pub fn unset<T>(&mut self, other: T)where T: Into<GamepadButtonMask> + Deref<Target = u16>,
Unset all other flags.
other can be either a single flag or another mask.
sourcepub fn toggle<T>(&mut self, other: T)where
T: Into<GamepadButtonMask> + Deref<Target = u16>,
pub fn toggle<T>(&mut self, other: T)where T: Into<GamepadButtonMask> + Deref<Target = u16>,
Toggle all other flags.
other can be either a single flag or another mask.
sourcepub fn contains<T>(&self, other: T) -> boolwhere
T: Into<GamepadButtonMask> + Deref<Target = u16>,
pub fn contains<T>(&self, other: T) -> boolwhere T: Into<GamepadButtonMask> + Deref<Target = u16>,
Check if the mask contains all of other’s flags.
other can be either a single flag or another mask.
sourcepub fn intersects<T>(&self, other: T) -> boolwhere
T: Into<GamepadButtonMask> + Deref<Target = u16>,
pub fn intersects<T>(&self, other: T) -> boolwhere T: Into<GamepadButtonMask> + Deref<Target = u16>,
Check if the mask has common flags with other.
other can be either a single flag or another mask.
Methods from Deref<Target = u16>§
pub const MIN: u16 = 0u16
pub const MAX: u16 = 65_535u16
pub const BITS: u32 = 16u32
Trait Implementations§
source§impl BitAnd<GamepadButton> for GamepadButtonMask
impl BitAnd<GamepadButton> for GamepadButtonMask
§type Output = GamepadButtonMask
type Output = GamepadButtonMask
The resulting type after applying the
& operator.source§impl BitAnd<GamepadButtonMask> for GamepadButton
impl BitAnd<GamepadButtonMask> for GamepadButton
§type Output = GamepadButtonMask
type Output = GamepadButtonMask
The resulting type after applying the
& operator.source§impl BitAnd<GamepadButtonMask> for GamepadButtonMask
impl BitAnd<GamepadButtonMask> for GamepadButtonMask
§type Output = GamepadButtonMask
type Output = GamepadButtonMask
The resulting type after applying the
& operator.source§impl BitAndAssign<GamepadButton> for GamepadButtonMask
impl BitAndAssign<GamepadButton> for GamepadButtonMask
source§fn bitand_assign(&mut self, other: GamepadButton)
fn bitand_assign(&mut self, other: GamepadButton)
Performs the
&= operation. Read moresource§impl BitAndAssign<GamepadButtonMask> for GamepadButtonMask
impl BitAndAssign<GamepadButtonMask> for GamepadButtonMask
source§fn bitand_assign(&mut self, other: GamepadButtonMask)
fn bitand_assign(&mut self, other: GamepadButtonMask)
Performs the
&= operation. Read moresource§impl BitOr<GamepadButton> for GamepadButtonMask
impl BitOr<GamepadButton> for GamepadButtonMask
§type Output = GamepadButtonMask
type Output = GamepadButtonMask
The resulting type after applying the
| operator.source§impl BitOr<GamepadButtonMask> for GamepadButton
impl BitOr<GamepadButtonMask> for GamepadButton
§type Output = GamepadButtonMask
type Output = GamepadButtonMask
The resulting type after applying the
| operator.source§impl BitOr<GamepadButtonMask> for GamepadButtonMask
impl BitOr<GamepadButtonMask> for GamepadButtonMask
§type Output = GamepadButtonMask
type Output = GamepadButtonMask
The resulting type after applying the
| operator.source§impl BitOrAssign<GamepadButton> for GamepadButtonMask
impl BitOrAssign<GamepadButton> for GamepadButtonMask
source§fn bitor_assign(&mut self, other: GamepadButton)
fn bitor_assign(&mut self, other: GamepadButton)
Performs the
|= operation. Read moresource§impl BitOrAssign<GamepadButtonMask> for GamepadButtonMask
impl BitOrAssign<GamepadButtonMask> for GamepadButtonMask
source§fn bitor_assign(&mut self, other: GamepadButtonMask)
fn bitor_assign(&mut self, other: GamepadButtonMask)
Performs the
|= operation. Read moresource§impl BitXor<GamepadButton> for GamepadButtonMask
impl BitXor<GamepadButton> for GamepadButtonMask
§type Output = GamepadButtonMask
type Output = GamepadButtonMask
The resulting type after applying the
^ operator.source§impl BitXor<GamepadButtonMask> for GamepadButton
impl BitXor<GamepadButtonMask> for GamepadButton
§type Output = GamepadButtonMask
type Output = GamepadButtonMask
The resulting type after applying the
^ operator.source§impl BitXor<GamepadButtonMask> for GamepadButtonMask
impl BitXor<GamepadButtonMask> for GamepadButtonMask
§type Output = GamepadButtonMask
type Output = GamepadButtonMask
The resulting type after applying the
^ operator.source§impl BitXorAssign<GamepadButton> for GamepadButtonMask
impl BitXorAssign<GamepadButton> for GamepadButtonMask
source§fn bitxor_assign(&mut self, other: GamepadButton)
fn bitxor_assign(&mut self, other: GamepadButton)
Performs the
^= operation. Read moresource§impl BitXorAssign<GamepadButtonMask> for GamepadButtonMask
impl BitXorAssign<GamepadButtonMask> for GamepadButtonMask
source§fn bitxor_assign(&mut self, other: GamepadButtonMask)
fn bitxor_assign(&mut self, other: GamepadButtonMask)
Performs the
^= operation. Read moresource§impl Clone for GamepadButtonMask
impl Clone for GamepadButtonMask
source§fn clone(&self) -> GamepadButtonMask
fn clone(&self) -> GamepadButtonMask
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 Deref for GamepadButtonMask
impl Deref for GamepadButtonMask
source§impl From<GamepadButton> for GamepadButtonMask
impl From<GamepadButton> for GamepadButtonMask
source§fn from(flag: GamepadButton) -> Self
fn from(flag: GamepadButton) -> Self
Create a mask from a single flag.
When creating a mask from multiple flags or another mask just use the clone method
or the copy semantics.
source§impl Not for GamepadButtonMask
impl Not for GamepadButtonMask
source§impl Ord for GamepadButtonMask
impl Ord for GamepadButtonMask
source§fn cmp(&self, other: &GamepadButtonMask) -> Ordering
fn cmp(&self, other: &GamepadButtonMask) -> 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<GamepadButtonMask> for GamepadButtonMask
impl PartialEq<GamepadButtonMask> for GamepadButtonMask
source§fn eq(&self, other: &GamepadButtonMask) -> bool
fn eq(&self, other: &GamepadButtonMask) -> bool
This method tests for
self and other values to be equal, and is used
by ==.source§impl PartialOrd<GamepadButtonMask> for GamepadButtonMask
impl PartialOrd<GamepadButtonMask> for GamepadButtonMask
source§fn partial_cmp(&self, other: &GamepadButtonMask) -> Option<Ordering>
fn partial_cmp(&self, other: &GamepadButtonMask) -> 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 moreimpl Copy for GamepadButtonMask
impl Eq for GamepadButtonMask
impl StructuralEq for GamepadButtonMask
impl StructuralPartialEq for GamepadButtonMask
Auto Trait Implementations§
impl RefUnwindSafe for GamepadButtonMask
impl Send for GamepadButtonMask
impl Sync for GamepadButtonMask
impl Unpin for GamepadButtonMask
impl UnwindSafe for GamepadButtonMask
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