[−][src]Struct input_linux::bitmask::Bitmask
A set of bits that can be indexed by specific enum values.
Implementations
impl Bitmask<Vec<u8>>
[src]
pub fn resize(&mut self, kind: EventKind)
[src]
Reallocate the bitmask to fit all valid code values for the given event type.
impl<T: BitmaskTrait> Bitmask<T>
[src]
pub const EMPTY: Self
[src]
A new empty bitmask.
pub fn into_inner(self) -> T::Array
[src]
Extracts the underlying bitmask data.
pub fn iter(&self) -> BitmaskIterator<T>ⓘImportant traits for BitmaskIterator<'a, T>
impl<'a, T: BitmaskTrait> Iterator for BitmaskIterator<'a, T> type Item = T::Index;
[src]
Important traits for BitmaskIterator<'a, T>
impl<'a, T: BitmaskTrait> Iterator for BitmaskIterator<'a, T> type Item = T::Index;
Iterates over all set bits.
pub fn data(&self) -> &T::Array
[src]
Borrows the underlying bitmask data.
pub fn data_mut(&mut self) -> &mut T::Array
[src]
Mutably borrows the underlying bitmask data.
pub fn clear(&mut self)
[src]
Unset all bits in the bitmask.
pub fn get(&self, index: T::Index) -> bool
[src]
Gets the status of an index in the bitmask.
pub fn insert(&mut self, index: T::Index)
[src]
Sets the status of an index in the bitmask.
pub fn remove(&mut self, index: T::Index)
[src]
Clears the status of an index in the bitmask.
pub fn toggle(&mut self, index: T::Index)
[src]
Inverts the status of an index in the bitmask.
pub fn or<I: IntoIterator<Item = T::Index>>(&mut self, indices: I)
[src]
Merges the provided indices into the bitmask.
Trait Implementations
impl<T: BitmaskTrait> AsMut<[u8]> for Bitmask<T>
[src]
impl<T: BitmaskTrait> AsRef<[u8]> for Bitmask<T>
[src]
impl<T: Clone + BitmaskTrait> Clone for Bitmask<T> where
T::Array: Clone,
[src]
T::Array: Clone,
impl<T: Copy + BitmaskTrait> Copy for Bitmask<T> where
T::Array: Copy,
[src]
T::Array: Copy,
impl<T: BitmaskTrait> Debug for Bitmask<T> where
T::Index: Debug,
[src]
T::Index: Debug,
impl<T: BitmaskTrait> Default for Bitmask<T>
[src]
impl<T: BitmaskTrait> Deref for Bitmask<T>
[src]
impl<T: BitmaskTrait> DerefMut for Bitmask<T>
[src]
impl<'a, T: BitmaskTrait> IntoIterator for &'a Bitmask<T>
[src]
Auto Trait Implementations
impl<T> RefUnwindSafe for Bitmask<T> where
<T as BitmaskTrait>::Array: RefUnwindSafe,
<T as BitmaskTrait>::Array: RefUnwindSafe,
impl<T> Send for Bitmask<T> where
<T as BitmaskTrait>::Array: Send,
<T as BitmaskTrait>::Array: Send,
impl<T> Sync for Bitmask<T> where
<T as BitmaskTrait>::Array: Sync,
<T as BitmaskTrait>::Array: Sync,
impl<T> Unpin for Bitmask<T> where
<T as BitmaskTrait>::Array: Unpin,
<T as BitmaskTrait>::Array: Unpin,
impl<T> UnwindSafe for Bitmask<T> where
<T as BitmaskTrait>::Array: UnwindSafe,
<T as BitmaskTrait>::Array: UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,