pub struct Modifiers(/* private fields */);Expand description
A set of held modifier keys.
Backed by a private bit set so the in-memory representation can grow (e.g. to
u16) without changing the public API, and so no third-party bit-flags type
leaks into this crate’s semver surface.
Implementations§
Source§impl Modifiers
impl Modifiers
Sourcepub const fn empty() -> Self
pub const fn empty() -> Self
Returns the empty modifier set (alias for Modifiers::NONE).
Sourcepub const fn contains(self, other: Modifiers) -> bool
pub const fn contains(self, other: Modifiers) -> bool
Returns true if every modifier in other is also held in self.
Sourcepub const fn difference(self, other: Modifiers) -> Self
pub const fn difference(self, other: Modifiers) -> Self
Returns self with every modifier in other removed.
Trait Implementations§
Source§impl BitOrAssign for Modifiers
impl BitOrAssign for Modifiers
Source§fn bitor_assign(&mut self, rhs: Modifiers)
fn bitor_assign(&mut self, rhs: Modifiers)
Performs the
|= operation. Read moreimpl Copy for Modifiers
impl Eq for Modifiers
impl StructuralPartialEq for Modifiers
Auto Trait Implementations§
impl Freeze for Modifiers
impl RefUnwindSafe for Modifiers
impl Send for Modifiers
impl Sync for Modifiers
impl Unpin for Modifiers
impl UnsafeUnpin for Modifiers
impl UnwindSafe for Modifiers
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