Struct dbsdk_rs::gamepad::GamepadButtonMask
source · [−]#[repr(C)]pub struct GamepadButtonMask { /* private fields */ }
Implementations
sourceimpl 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>
Trait Implementations
sourceimpl BitAnd<GamepadButton> for GamepadButtonMask
impl BitAnd<GamepadButton> for GamepadButtonMask
type Output = GamepadButtonMask
type Output = GamepadButtonMask
The resulting type after applying the
&
operator.sourcefn bitand(self, other: GamepadButton) -> Self::Output
fn bitand(self, other: GamepadButton) -> Self::Output
Performs the
&
operation. Read moresourceimpl BitAnd<GamepadButtonMask> for GamepadButton
impl BitAnd<GamepadButtonMask> for GamepadButton
type Output = GamepadButtonMask
type Output = GamepadButtonMask
The resulting type after applying the
&
operator.sourcefn bitand(self, other: GamepadButtonMask) -> Self::Output
fn bitand(self, other: GamepadButtonMask) -> Self::Output
Performs the
&
operation. Read moresourceimpl BitAnd<GamepadButtonMask> for GamepadButtonMask
impl BitAnd<GamepadButtonMask> for GamepadButtonMask
type Output = GamepadButtonMask
type Output = GamepadButtonMask
The resulting type after applying the
&
operator.sourcefn bitand(self, other: GamepadButtonMask) -> Self::Output
fn bitand(self, other: GamepadButtonMask) -> Self::Output
Performs the
&
operation. Read moresourceimpl BitAndAssign<GamepadButton> for GamepadButtonMask
impl BitAndAssign<GamepadButton> for GamepadButtonMask
sourcefn bitand_assign(&mut self, other: GamepadButton)
fn bitand_assign(&mut self, other: GamepadButton)
Performs the
&=
operation. Read moresourceimpl BitAndAssign<GamepadButtonMask> for GamepadButtonMask
impl BitAndAssign<GamepadButtonMask> for GamepadButtonMask
sourcefn bitand_assign(&mut self, other: GamepadButtonMask)
fn bitand_assign(&mut self, other: GamepadButtonMask)
Performs the
&=
operation. Read moresourceimpl BitOr<GamepadButton> for GamepadButtonMask
impl BitOr<GamepadButton> for GamepadButtonMask
type Output = GamepadButtonMask
type Output = GamepadButtonMask
The resulting type after applying the
|
operator.sourcefn bitor(self, other: GamepadButton) -> Self::Output
fn bitor(self, other: GamepadButton) -> Self::Output
Performs the
|
operation. Read moresourceimpl BitOr<GamepadButtonMask> for GamepadButton
impl BitOr<GamepadButtonMask> for GamepadButton
type Output = GamepadButtonMask
type Output = GamepadButtonMask
The resulting type after applying the
|
operator.sourcefn bitor(self, other: GamepadButtonMask) -> Self::Output
fn bitor(self, other: GamepadButtonMask) -> Self::Output
Performs the
|
operation. Read moresourceimpl BitOr<GamepadButtonMask> for GamepadButtonMask
impl BitOr<GamepadButtonMask> for GamepadButtonMask
type Output = GamepadButtonMask
type Output = GamepadButtonMask
The resulting type after applying the
|
operator.sourcefn bitor(self, other: GamepadButtonMask) -> Self::Output
fn bitor(self, other: GamepadButtonMask) -> Self::Output
Performs the
|
operation. Read moresourceimpl BitOrAssign<GamepadButton> for GamepadButtonMask
impl BitOrAssign<GamepadButton> for GamepadButtonMask
sourcefn bitor_assign(&mut self, other: GamepadButton)
fn bitor_assign(&mut self, other: GamepadButton)
Performs the
|=
operation. Read moresourceimpl BitOrAssign<GamepadButtonMask> for GamepadButtonMask
impl BitOrAssign<GamepadButtonMask> for GamepadButtonMask
sourcefn bitor_assign(&mut self, other: GamepadButtonMask)
fn bitor_assign(&mut self, other: GamepadButtonMask)
Performs the
|=
operation. Read moresourceimpl BitXor<GamepadButton> for GamepadButtonMask
impl BitXor<GamepadButton> for GamepadButtonMask
type Output = GamepadButtonMask
type Output = GamepadButtonMask
The resulting type after applying the
^
operator.sourcefn bitxor(self, other: GamepadButton) -> Self::Output
fn bitxor(self, other: GamepadButton) -> Self::Output
Performs the
^
operation. Read moresourceimpl BitXor<GamepadButtonMask> for GamepadButton
impl BitXor<GamepadButtonMask> for GamepadButton
type Output = GamepadButtonMask
type Output = GamepadButtonMask
The resulting type after applying the
^
operator.sourcefn bitxor(self, other: GamepadButtonMask) -> Self::Output
fn bitxor(self, other: GamepadButtonMask) -> Self::Output
Performs the
^
operation. Read moresourceimpl BitXor<GamepadButtonMask> for GamepadButtonMask
impl BitXor<GamepadButtonMask> for GamepadButtonMask
type Output = GamepadButtonMask
type Output = GamepadButtonMask
The resulting type after applying the
^
operator.sourcefn bitxor(self, other: GamepadButtonMask) -> Self::Output
fn bitxor(self, other: GamepadButtonMask) -> Self::Output
Performs the
^
operation. Read moresourceimpl BitXorAssign<GamepadButton> for GamepadButtonMask
impl BitXorAssign<GamepadButton> for GamepadButtonMask
sourcefn bitxor_assign(&mut self, other: GamepadButton)
fn bitxor_assign(&mut self, other: GamepadButton)
Performs the
^=
operation. Read moresourceimpl BitXorAssign<GamepadButtonMask> for GamepadButtonMask
impl BitXorAssign<GamepadButtonMask> for GamepadButtonMask
sourcefn bitxor_assign(&mut self, other: GamepadButtonMask)
fn bitxor_assign(&mut self, other: GamepadButtonMask)
Performs the
^=
operation. Read moresourceimpl Clone for GamepadButtonMask
impl Clone for GamepadButtonMask
sourcefn clone(&self) -> GamepadButtonMask
fn clone(&self) -> GamepadButtonMask
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresourceimpl Deref for GamepadButtonMask
impl Deref for GamepadButtonMask
sourceimpl From<GamepadButton> for GamepadButtonMask
impl From<GamepadButton> for GamepadButtonMask
sourcefn 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.
sourceimpl Not for GamepadButtonMask
impl Not for GamepadButtonMask
sourceimpl Ord for GamepadButtonMask
impl Ord for GamepadButtonMask
sourcefn cmp(&self, other: &GamepadButtonMask) -> Ordering
fn cmp(&self, other: &GamepadButtonMask) -> Ordering
1.21.0 · sourcefn max(self, other: Self) -> Self
fn max(self, other: Self) -> Self
Compares and returns the maximum of two values. Read more
1.21.0 · sourcefn min(self, other: Self) -> Self
fn min(self, other: Self) -> Self
Compares and returns the minimum of two values. Read more
1.50.0 · sourcefn clamp(self, min: Self, max: Self) -> Selfwhere
Self: PartialOrd<Self>,
fn clamp(self, min: Self, max: Self) -> Selfwhere
Self: PartialOrd<Self>,
Restrict a value to a certain interval. Read more
sourceimpl PartialEq<GamepadButtonMask> for GamepadButtonMask
impl PartialEq<GamepadButtonMask> for GamepadButtonMask
sourcefn eq(&self, other: &GamepadButtonMask) -> bool
fn eq(&self, other: &GamepadButtonMask) -> bool
sourceimpl PartialOrd<GamepadButtonMask> for GamepadButtonMask
impl PartialOrd<GamepadButtonMask> for GamepadButtonMask
sourcefn partial_cmp(&self, other: &GamepadButtonMask) -> Option<Ordering>
fn partial_cmp(&self, other: &GamepadButtonMask) -> Option<Ordering>
1.0.0 · sourcefn 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
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more