Struct embedded_graphics_simulator::sdl2::Mod [−][src]
pub struct Mod { /* fields omitted */ }
Implementations
impl Mod
[src]
impl Mod
[src]pub const NOMOD: Mod
[src]
pub const LSHIFTMOD: Mod
[src]
pub const RSHIFTMOD: Mod
[src]
pub const LCTRLMOD: Mod
[src]
pub const RCTRLMOD: Mod
[src]
pub const LALTMOD: Mod
[src]
pub const RALTMOD: Mod
[src]
pub const LGUIMOD: Mod
[src]
pub const RGUIMOD: Mod
[src]
pub const NUMMOD: Mod
[src]
pub const CAPSMOD: Mod
[src]
pub const MODEMOD: Mod
[src]
pub const RESERVEDMOD: Mod
[src]
pub const fn empty() -> Mod
[src]
Returns an empty set of flags
pub const fn all() -> Mod
[src]
Returns the set containing all flags.
pub const fn bits(&self) -> u16
[src]
Returns the raw value of the flags currently stored.
pub fn from_bits(bits: u16) -> Option<Mod>
[src]
Convert from underlying bit representation, unless that representation contains bits that do not correspond to a flag.
pub const fn from_bits_truncate(bits: u16) -> Mod
[src]
Convert from underlying bit representation, dropping any bits that do not correspond to flags.
pub const unsafe fn from_bits_unchecked(bits: u16) -> Mod
[src]
Convert from underlying bit representation, preserving all bits (even those not corresponding to a defined flag).
pub const fn is_empty(&self) -> bool
[src]
Returns true
if no flags are currently stored.
pub const fn is_all(&self) -> bool
[src]
Returns true
if all flags are currently set.
pub const fn intersects(&self, other: Mod) -> bool
[src]
Returns true
if there are flags common to both self
and other
.
pub const fn contains(&self, other: Mod) -> bool
[src]
Returns true
all of the flags in other
are contained within self
.
pub fn insert(&mut self, other: Mod)
[src]
Inserts the specified flags in-place.
pub fn remove(&mut self, other: Mod)
[src]
Removes the specified flags in-place.
pub fn toggle(&mut self, other: Mod)
[src]
Toggles the specified flags in-place.
pub fn set(&mut self, other: Mod, value: bool)
[src]
Inserts or removes the specified flags depending on the passed value.
Trait Implementations
impl BitAndAssign<Mod> for Mod
[src]
impl BitAndAssign<Mod> for Mod
[src]pub fn bitand_assign(&mut self, other: Mod)
[src]
Disables all flags disabled in the set.
impl BitOrAssign<Mod> for Mod
[src]
impl BitOrAssign<Mod> for Mod
[src]pub fn bitor_assign(&mut self, other: Mod)
[src]
Adds the set of flags.
impl BitXorAssign<Mod> for Mod
[src]
impl BitXorAssign<Mod> for Mod
[src]pub fn bitxor_assign(&mut self, other: Mod)
[src]
Toggles the set of flags.
impl Extend<Mod> for Mod
[src]
impl Extend<Mod> for Mod
[src]pub fn extend<T>(&mut self, iterator: T) where
T: IntoIterator<Item = Mod>,
[src]
T: IntoIterator<Item = Mod>,
pub fn extend_one(&mut self, item: A)
[src]
pub fn extend_reserve(&mut self, additional: usize)
[src]
impl FromIterator<Mod> for Mod
[src]
impl FromIterator<Mod> for Mod
[src]pub fn from_iter<T>(iterator: T) -> Mod where
T: IntoIterator<Item = Mod>,
[src]
T: IntoIterator<Item = Mod>,
impl PartialOrd<Mod> for Mod
[src]
impl PartialOrd<Mod> for Mod
[src]impl StructuralEq for Mod
[src]
impl StructuralEq for Mod
[src]impl StructuralPartialEq for Mod
[src]
impl StructuralPartialEq for Mod
[src]Auto Trait Implementations
impl RefUnwindSafe for Mod
impl RefUnwindSafe for Mod
impl UnwindSafe for Mod
impl UnwindSafe for Mod