#[repr(C)]pub struct GamepadButtonMask { /* private fields */ }
Implementations§
Source§impl GamepadButtonMask
impl GamepadButtonMask
Sourcepub fn set<T>(&mut self, other: T)
pub fn set<T>(&mut self, other: T)
Set all other
flags.
other
can be either a single flag or another mask.
Sourcepub fn unset<T>(&mut self, other: T)
pub fn unset<T>(&mut self, other: T)
Unset all other
flags.
other
can be either a single flag or another mask.
Sourcepub fn toggle<T>(&mut self, other: T)
pub fn toggle<T>(&mut self, other: T)
Toggle all other
flags.
other
can be either a single flag or another mask.
Sourcepub fn contains<T>(&self, other: T) -> bool
pub fn contains<T>(&self, other: T) -> bool
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) -> bool
pub fn intersects<T>(&self, other: T) -> bool
Check if the mask has common flags with other
.
other
can be either a single flag or another mask.
Trait Implementations§
Source§impl BitAnd<GamepadButton> for GamepadButtonMask
impl BitAnd<GamepadButton> for GamepadButtonMask
Source§type Output = GamepadButtonMask
type Output = GamepadButtonMask
The resulting type after applying the
&
operator.Source§impl BitAnd<GamepadButtonMask> for GamepadButton
impl BitAnd<GamepadButtonMask> for GamepadButton
Source§type Output = GamepadButtonMask
type Output = GamepadButtonMask
The resulting type after applying the
&
operator.Source§impl BitAnd for GamepadButtonMask
impl BitAnd for GamepadButtonMask
Source§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 for GamepadButtonMask
impl BitAndAssign 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
Source§type Output = GamepadButtonMask
type Output = GamepadButtonMask
The resulting type after applying the
|
operator.Source§impl BitOr<GamepadButtonMask> for GamepadButton
impl BitOr<GamepadButtonMask> for GamepadButton
Source§type Output = GamepadButtonMask
type Output = GamepadButtonMask
The resulting type after applying the
|
operator.Source§impl BitOr for GamepadButtonMask
impl BitOr for GamepadButtonMask
Source§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 for GamepadButtonMask
impl BitOrAssign 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
Source§type Output = GamepadButtonMask
type Output = GamepadButtonMask
The resulting type after applying the
^
operator.Source§impl BitXor<GamepadButtonMask> for GamepadButton
impl BitXor<GamepadButtonMask> for GamepadButton
Source§type Output = GamepadButtonMask
type Output = GamepadButtonMask
The resulting type after applying the
^
operator.Source§impl BitXor for GamepadButtonMask
impl BitXor for GamepadButtonMask
Source§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 for GamepadButtonMask
impl BitXorAssign 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 Debug for GamepadButtonMask
impl Debug for GamepadButtonMask
Source§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 Hash for GamepadButtonMask
impl Hash for GamepadButtonMask
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 for GamepadButtonMask
impl PartialEq for GamepadButtonMask
Source§impl PartialOrd for GamepadButtonMask
impl PartialOrd for GamepadButtonMask
impl Copy for GamepadButtonMask
impl Eq for GamepadButtonMask
impl StructuralPartialEq for GamepadButtonMask
Auto Trait Implementations§
impl Freeze for GamepadButtonMask
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