Struct osu::Mods
[−]
pub struct Mods { /* fields omitted */ }
Methods
impl Mods
const NONE: Mods
NONE: Mods = Mods{bits: 0,}
const NO_FAIL: Mods
NO_FAIL: Mods = Mods{bits: 1,}
const EASY: Mods
EASY: Mods = Mods{bits: 1 << 1,}
const NO_VIDEO: Mods
NO_VIDEO: Mods = Mods{bits: 1 << 2,}
const HIDDEN: Mods
HIDDEN: Mods = Mods{bits: 1 << 3,}
const HARD_ROCK: Mods
HARD_ROCK: Mods = Mods{bits: 1 << 4,}
const SUDDEN_DEATH: Mods
SUDDEN_DEATH: Mods = Mods{bits: 1 << 5,}
const DOUBLE_TIME: Mods
DOUBLE_TIME: Mods = Mods{bits: 1 << 6,}
const RELAX: Mods
RELAX: Mods = Mods{bits: 1 << 7,}
const HALF_TIME: Mods
HALF_TIME: Mods = Mods{bits: 1 << 8,}
const NIGHTCORE: Mods
NIGHTCORE: Mods = Mods{bits: 1 << 9,}
Only set along with DOUBLE_TIME
. i.e.: NC only gives 576
const FLASHLIGHT: Mods
FLASHLIGHT: Mods = Mods{bits: 1 << 10,}
const AUTOPLAY: Mods
AUTOPLAY: Mods = Mods{bits: 1 << 11,}
const SPUN_OUT: Mods
SPUN_OUT: Mods = Mods{bits: 1 << 12,}
const RELAX2: Mods
RELAX2: Mods = Mods{bits: 1 << 13,}
Could be "Autopilot".
const PERFECT: Mods
PERFECT: Mods = Mods{bits: 1 << 14,}
const KEY4: Mods
KEY4: Mods = Mods{bits: 1 << 15,}
const KEY5: Mods
KEY5: Mods = Mods{bits: 1 << 16,}
const KEY6: Mods
KEY6: Mods = Mods{bits: 1 << 17,}
const KEY7: Mods
KEY7: Mods = Mods{bits: 1 << 18,}
const KEY8: Mods
KEY8: Mods = Mods{bits: 1 << 19,}
const KEY_MOD: Mods
KEY_MOD: Mods = Mods{bits: 1015808,}
const FADE_IN: Mods
FADE_IN: Mods = Mods{bits: 1 << 20,}
const RANDOM: Mods
RANDOM: Mods = Mods{bits: 1 << 21,}
const LAST_MOD: Mods
LAST_MOD: Mods = Mods{bits: 1 << 22,}
const FREE_MOD_ALLOWED: Mods
FREE_MOD_ALLOWED: Mods = Mods{bits: 2069691,}
const KEY9: Mods
KEY9: Mods = Mods{bits: 1 << 24,}
const KEY10: Mods
KEY10: Mods = Mods{bits: 1 << 25,}
const KEY1: Mods
KEY1: Mods = Mods{bits: 1 << 26,}
const KEY2: Mods
KEY2: Mods = Mods{bits: 1 << 27,}
const KEY3: Mods
KEY3: Mods = Mods{bits: 1 << 28,}
fn empty() -> Mods
Returns an empty set of flags.
fn all() -> Mods
Returns the set containing all flags.
fn bits(&self) -> i64
Returns the raw value of the flags currently stored.
fn from_bits(bits: i64) -> Option<Mods>
Convert from underlying bit representation, unless that representation contains bits that do not correspond to a flag.
fn from_bits_truncate(bits: i64) -> Mods
Convert from underlying bit representation, dropping any bits that do not correspond to flags.
fn is_empty(&self) -> bool
Returns true
if no flags are currently stored.
fn is_all(&self) -> bool
Returns true
if all flags are currently set.
fn intersects(&self, other: Mods) -> bool
Returns true
if there are flags common to both self
and other
.
fn contains(&self, other: Mods) -> bool
Returns true
all of the flags in other
are contained within self
.
fn insert(&mut self, other: Mods)
Inserts the specified flags in-place.
fn remove(&mut self, other: Mods)
Removes the specified flags in-place.
fn toggle(&mut self, other: Mods)
Toggles the specified flags in-place.
fn set(&mut self, other: Mods, value: bool)
Inserts or removes the specified flags depending on the passed value.
Trait Implementations
impl Copy for Mods
impl PartialEq for Mods
fn eq(&self, __arg_0: &Mods) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &Mods) -> bool
This method tests for !=
.
impl Eq for Mods
impl Clone for Mods
fn clone(&self) -> Mods
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl PartialOrd for Mods
fn partial_cmp(&self, __arg_0: &Mods) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
fn lt(&self, __arg_0: &Mods) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
fn le(&self, __arg_0: &Mods) -> bool
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
fn gt(&self, __arg_0: &Mods) -> bool
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
fn ge(&self, __arg_0: &Mods) -> bool
This method tests greater than or equal to (for self
and other
) and is used by the >=
operator. Read more
impl Ord for Mods
fn cmp(&self, __arg_0: &Mods) -> Ordering
This method returns an Ordering
between self
and other
. Read more
fn max(self, other: Self) -> Self
1.22.0[src]
Compares and returns the maximum of two values. Read more
fn min(self, other: Self) -> Self
1.22.0[src]
Compares and returns the minimum of two values. Read more
impl Hash for Mods
fn hash<__H: Hasher>(&self, __arg_0: &mut __H)
Feeds this value into the given [Hasher
]. Read more
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
Feeds a slice of this type into the given [Hasher
]. Read more
impl Debug for Mods
impl Binary for Mods
impl Octal for Mods
impl LowerHex for Mods
impl UpperHex for Mods
impl BitOr for Mods
type Output = Mods
The resulting type after applying the |
operator.
fn bitor(self, other: Mods) -> Mods
Returns the union of the two sets of flags.
impl BitOrAssign for Mods
fn bitor_assign(&mut self, other: Mods)
Adds the set of flags.
impl BitXor for Mods
type Output = Mods
The resulting type after applying the ^
operator.
fn bitxor(self, other: Mods) -> Mods
Returns the left flags, but with all the right flags toggled.
impl BitXorAssign for Mods
fn bitxor_assign(&mut self, other: Mods)
Toggles the set of flags.
impl BitAnd for Mods
type Output = Mods
The resulting type after applying the &
operator.
fn bitand(self, other: Mods) -> Mods
Returns the intersection between the two sets of flags.
impl BitAndAssign for Mods
fn bitand_assign(&mut self, other: Mods)
Disables all flags disabled in the set.
impl Sub for Mods
type Output = Mods
The resulting type after applying the -
operator.
fn sub(self, other: Mods) -> Mods
Returns the set difference of the two sets of flags.
impl SubAssign for Mods
fn sub_assign(&mut self, other: Mods)
Disables all flags enabled in the set.
impl Not for Mods
type Output = Mods
The resulting type after applying the !
operator.
fn not(self) -> Mods
Returns the complement of this set of flags.
impl Extend<Mods> for Mods
fn extend<T: IntoIterator<Item = Mods>>(&mut self, iterator: T)
Extends a collection with the contents of an iterator. Read more
impl FromIterator<Mods> for Mods
fn from_iter<T: IntoIterator<Item = Mods>>(iterator: T) -> Mods
Creates a value from an iterator. Read more
impl<'de> Deserialize<'de> for Mods
[src]
fn deserialize<D: Deserializer<'de>>(
deserializer: D
) -> StdResult<Self, D::Error>
[src]
deserializer: D
) -> StdResult<Self, D::Error>
Deserialize this value from the given Serde deserializer. Read more