[−]Struct prongs::types::InputTypeFlags
InputTypeFlags are used to specify what type of input is to be allowed when in "assignment mode" for event mapping. This allows the caller to filter out unwanted event types in a generic way without having to handle the backend implementation details.
Methods
impl InputTypeFlags
impl InputTypeFlags
pub const Button: InputTypeFlags
Any controller or mouse button including controller "hat" presses
pub const Key: InputTypeFlags
Any keyboard key
pub const Axis: InputTypeFlags
Any controller axis
pub const MouseMove: InputTypeFlags
Any mouse movement
pub const KeyOrButton: InputTypeFlags
Key or Button combination
pub const AxisKeyOrButton: InputTypeFlags
Axis, Key or Button combination
pub const Other: InputTypeFlags
Anything else (so you can do Any - Other for e.g. disconnect events etc.)
pub const Any: InputTypeFlags
Any type
pub fn empty() -> InputTypeFlags
pub fn empty() -> InputTypeFlags
Returns an empty set of flags.
pub fn all() -> InputTypeFlags
pub fn all() -> InputTypeFlags
Returns the set containing all flags.
pub fn bits(&self) -> u64
pub fn bits(&self) -> u64
Returns the raw value of the flags currently stored.
pub fn from_bits(bits: u64) -> Option<InputTypeFlags>
pub fn from_bits(bits: u64) -> Option<InputTypeFlags>
Convert from underlying bit representation, unless that representation contains bits that do not correspond to a flag.
pub fn from_bits_truncate(bits: u64) -> InputTypeFlags
pub fn from_bits_truncate(bits: u64) -> InputTypeFlags
Convert from underlying bit representation, dropping any bits that do not correspond to flags.
pub fn is_empty(&self) -> bool
pub fn is_empty(&self) -> bool
Returns true
if no flags are currently stored.
pub fn is_all(&self) -> bool
pub fn is_all(&self) -> bool
Returns true
if all flags are currently set.
pub fn intersects(&self, other: InputTypeFlags) -> bool
pub fn intersects(&self, other: InputTypeFlags) -> bool
Returns true
if there are flags common to both self
and other
.
pub fn contains(&self, other: InputTypeFlags) -> bool
pub fn contains(&self, other: InputTypeFlags) -> bool
Returns true
all of the flags in other
are contained within self
.
pub fn insert(&mut self, other: InputTypeFlags)
pub fn insert(&mut self, other: InputTypeFlags)
Inserts the specified flags in-place.
pub fn remove(&mut self, other: InputTypeFlags)
pub fn remove(&mut self, other: InputTypeFlags)
Removes the specified flags in-place.
pub fn toggle(&mut self, other: InputTypeFlags)
pub fn toggle(&mut self, other: InputTypeFlags)
Toggles the specified flags in-place.
pub fn set(&mut self, other: InputTypeFlags, value: bool)
pub fn set(&mut self, other: InputTypeFlags, value: bool)
Inserts or removes the specified flags depending on the passed value.
Trait Implementations
impl PartialOrd<InputTypeFlags> for InputTypeFlags
impl PartialOrd<InputTypeFlags> for InputTypeFlags
fn partial_cmp(&self, other: &InputTypeFlags) -> Option<Ordering>
fn partial_cmp(&self, other: &InputTypeFlags) -> Option<Ordering>
fn lt(&self, other: &InputTypeFlags) -> bool
fn lt(&self, other: &InputTypeFlags) -> bool
fn le(&self, other: &InputTypeFlags) -> bool
fn le(&self, other: &InputTypeFlags) -> bool
fn gt(&self, other: &InputTypeFlags) -> bool
fn gt(&self, other: &InputTypeFlags) -> bool
fn ge(&self, other: &InputTypeFlags) -> bool
fn ge(&self, other: &InputTypeFlags) -> bool
impl Default for InputTypeFlags
[src]
impl Default for InputTypeFlags
fn default() -> InputTypeFlags
[src]
fn default() -> InputTypeFlags
impl Ord for InputTypeFlags
impl Ord for InputTypeFlags
fn cmp(&self, other: &InputTypeFlags) -> Ordering
fn cmp(&self, other: &InputTypeFlags) -> Ordering
fn max(self, other: Self) -> Self
1.21.0[src]
fn max(self, other: Self) -> Self
Compares and returns the maximum of two values. Read more
fn min(self, other: Self) -> Self
1.21.0[src]
fn min(self, other: Self) -> Self
Compares and returns the minimum of two values. Read more
impl PartialEq<InputTypeFlags> for InputTypeFlags
impl PartialEq<InputTypeFlags> for InputTypeFlags
fn eq(&self, other: &InputTypeFlags) -> bool
fn eq(&self, other: &InputTypeFlags) -> bool
fn ne(&self, other: &InputTypeFlags) -> bool
fn ne(&self, other: &InputTypeFlags) -> bool
impl Clone for InputTypeFlags
impl Clone for InputTypeFlags
fn clone(&self) -> InputTypeFlags
fn clone(&self) -> InputTypeFlags
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
impl Extend<InputTypeFlags> for InputTypeFlags
impl Extend<InputTypeFlags> for InputTypeFlags
fn extend<T: IntoIterator<Item = InputTypeFlags>>(&mut self, iterator: T)
fn extend<T: IntoIterator<Item = InputTypeFlags>>(&mut self, iterator: T)
impl Copy for InputTypeFlags
impl Copy for InputTypeFlags
impl Eq for InputTypeFlags
impl Eq for InputTypeFlags
impl Octal for InputTypeFlags
impl Octal for InputTypeFlags
impl Binary for InputTypeFlags
impl Binary for InputTypeFlags
impl Debug for InputTypeFlags
impl Debug for InputTypeFlags
impl UpperHex for InputTypeFlags
impl UpperHex for InputTypeFlags
impl LowerHex for InputTypeFlags
impl LowerHex for InputTypeFlags
impl Hash for InputTypeFlags
impl Hash for InputTypeFlags
fn hash<__H: Hasher>(&self, state: &mut __H)
fn hash<__H: Hasher>(&self, state: &mut __H)
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
Feeds a slice of this type into the given [Hasher
]. Read more
impl Sub<InputTypeFlags> for InputTypeFlags
impl Sub<InputTypeFlags> for InputTypeFlags
type Output = InputTypeFlags
The resulting type after applying the -
operator.
fn sub(self, other: InputTypeFlags) -> InputTypeFlags
fn sub(self, other: InputTypeFlags) -> InputTypeFlags
Returns the set difference of the two sets of flags.
impl SubAssign<InputTypeFlags> for InputTypeFlags
impl SubAssign<InputTypeFlags> for InputTypeFlags
fn sub_assign(&mut self, other: InputTypeFlags)
fn sub_assign(&mut self, other: InputTypeFlags)
Disables all flags enabled in the set.
impl Not for InputTypeFlags
impl Not for InputTypeFlags
type Output = InputTypeFlags
The resulting type after applying the !
operator.
fn not(self) -> InputTypeFlags
fn not(self) -> InputTypeFlags
Returns the complement of this set of flags.
impl BitAnd<InputTypeFlags> for InputTypeFlags
impl BitAnd<InputTypeFlags> for InputTypeFlags
type Output = InputTypeFlags
The resulting type after applying the &
operator.
fn bitand(self, other: InputTypeFlags) -> InputTypeFlags
fn bitand(self, other: InputTypeFlags) -> InputTypeFlags
Returns the intersection between the two sets of flags.
impl BitOr<InputTypeFlags> for InputTypeFlags
impl BitOr<InputTypeFlags> for InputTypeFlags
type Output = InputTypeFlags
The resulting type after applying the |
operator.
fn bitor(self, other: InputTypeFlags) -> InputTypeFlags
fn bitor(self, other: InputTypeFlags) -> InputTypeFlags
Returns the union of the two sets of flags.
impl BitXor<InputTypeFlags> for InputTypeFlags
impl BitXor<InputTypeFlags> for InputTypeFlags
type Output = InputTypeFlags
The resulting type after applying the ^
operator.
fn bitxor(self, other: InputTypeFlags) -> InputTypeFlags
fn bitxor(self, other: InputTypeFlags) -> InputTypeFlags
Returns the left flags, but with all the right flags toggled.
impl BitAndAssign<InputTypeFlags> for InputTypeFlags
impl BitAndAssign<InputTypeFlags> for InputTypeFlags
fn bitand_assign(&mut self, other: InputTypeFlags)
fn bitand_assign(&mut self, other: InputTypeFlags)
Disables all flags disabled in the set.
impl BitOrAssign<InputTypeFlags> for InputTypeFlags
impl BitOrAssign<InputTypeFlags> for InputTypeFlags
fn bitor_assign(&mut self, other: InputTypeFlags)
fn bitor_assign(&mut self, other: InputTypeFlags)
Adds the set of flags.
impl BitXorAssign<InputTypeFlags> for InputTypeFlags
impl BitXorAssign<InputTypeFlags> for InputTypeFlags
fn bitxor_assign(&mut self, other: InputTypeFlags)
fn bitxor_assign(&mut self, other: InputTypeFlags)
Toggles the set of flags.
impl FromIterator<InputTypeFlags> for InputTypeFlags
impl FromIterator<InputTypeFlags> for InputTypeFlags
fn from_iter<T: IntoIterator<Item = InputTypeFlags>>(
iterator: T
) -> InputTypeFlags
fn from_iter<T: IntoIterator<Item = InputTypeFlags>>(
iterator: T
) -> InputTypeFlags
Auto Trait Implementations
impl Send for InputTypeFlags
impl Send for InputTypeFlags
impl Sync for InputTypeFlags
impl Sync for InputTypeFlags
Blanket Implementations
impl<T, U> Into for T where
U: From<T>,
[src]
impl<T, U> Into for T where
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
impl<T> ToOwned for T where
T: Clone,
impl<T> From for T
[src]
impl<T> From for T
impl<T, U> TryFrom for T where
T: From<U>,
[src]
impl<T, U> TryFrom for T where
T: From<U>,
type Error = !
try_from
)The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
impl<T> Borrow for T where
T: ?Sized,
[src]
impl<T> Borrow for T where
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
impl<T> Any for T where
T: 'static + ?Sized,
fn get_type_id(&self) -> TypeId
[src]
fn get_type_id(&self) -> TypeId
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
impl<T, U> TryInto for T where
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
try_from
)The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
impl<T> BorrowMut for T where
T: ?Sized,
[src]
impl<T> BorrowMut for T where
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
fn borrow_mut(&mut self) -> &mut T