pub struct PointerButtons(/* private fields */);
Implementations§
Source§impl PointerButtons
impl PointerButtons
Sourcepub fn new() -> PointerButtons
pub fn new() -> PointerButtons
Create a new empty set.
Sourcepub fn insert(&mut self, button: PointerButton)
pub fn insert(&mut self, button: PointerButton)
Add the button
to the set.
Sourcepub fn remove(&mut self, button: PointerButton)
pub fn remove(&mut self, button: PointerButton)
Remove the button
from the set.
Sourcepub fn with(self, button: PointerButton) -> PointerButtons
pub fn with(self, button: PointerButton) -> PointerButtons
Builder-style method for adding the button
to the set.
Sourcepub fn without(self, button: PointerButton) -> PointerButtons
pub fn without(self, button: PointerButton) -> PointerButtons
Builder-style method for removing the button
from the set.
Sourcepub fn contains(self, button: PointerButton) -> bool
pub fn contains(self, button: PointerButton) -> bool
Returns true
if the button
is in the set.
Sourcepub fn is_superset(self, buttons: PointerButtons) -> bool
pub fn is_superset(self, buttons: PointerButtons) -> bool
Returns true
if all the buttons
are in the set.
Sourcepub fn has_primary(self) -> bool
pub fn has_primary(self) -> bool
Returns true
if PointerButton::Primary
is in the set.
Sourcepub fn has_secondary(self) -> bool
pub fn has_secondary(self) -> bool
Returns true
if PointerButton::Secondary
is in the set.
Sourcepub fn has_auxilary(self) -> bool
pub fn has_auxilary(self) -> bool
Returns true
if PointerButton::Auxilary
is in the set.
Sourcepub fn extend(&mut self, buttons: PointerButtons)
pub fn extend(&mut self, buttons: PointerButtons)
Adds all the buttons
to the set.
Sourcepub fn union(self, other: PointerButtons) -> PointerButtons
pub fn union(self, other: PointerButtons) -> PointerButtons
Returns a union of the values in self
and other
.
Trait Implementations§
Source§impl Clone for PointerButtons
impl Clone for PointerButtons
Source§fn clone(&self) -> PointerButtons
fn clone(&self) -> PointerButtons
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 PointerButtons
impl Debug for PointerButtons
Source§impl Default for PointerButtons
impl Default for PointerButtons
Source§fn default() -> PointerButtons
fn default() -> PointerButtons
Returns the “default value” for a type. Read more
Source§impl PartialEq for PointerButtons
impl PartialEq for PointerButtons
impl Copy for PointerButtons
impl Eq for PointerButtons
impl StructuralPartialEq for PointerButtons
Auto Trait Implementations§
impl Freeze for PointerButtons
impl RefUnwindSafe for PointerButtons
impl Send for PointerButtons
impl Sync for PointerButtons
impl Unpin for PointerButtons
impl UnwindSafe for PointerButtons
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