#![allow(clippy::all, clippy::pedantic)]
use std::{
borrow::Borrow,
cmp::Ordering,
fmt::{Display, Formatter, Result as FmtResult},
num::NonZeroU8,
};
use crate::{Acronym, GameMode};
mod all_structs {
#[derive(Clone, Debug, Default, PartialEq)]
#[cfg_attr(
feature = "rkyv",
derive(rkyv::Archive, rkyv::Serialize, rkyv::Deserialize)
)]
pub struct EasyOsu {
pub retries: Option<f64>,
}
#[derive(Copy, Eq, Clone, Debug, Default, PartialEq)]
#[cfg_attr(feature = "rkyv", derive(rkyv::Archive, rkyv::Serialize, rkyv::Deserialize,rkyv::Portable,rkyv::bytecheck::CheckBytes,),bytecheck(crate = rkyv::bytecheck),rkyv(as = Self), repr(transparent))]
pub struct NoFailOsu {}
#[derive(Clone, Debug, Default, PartialEq)]
#[cfg_attr(
feature = "rkyv",
derive(rkyv::Archive, rkyv::Serialize, rkyv::Deserialize)
)]
pub struct HalfTimeOsu {
pub speed_change: Option<f64>,
pub adjust_pitch: Option<bool>,
}
#[derive(Clone, Debug, Default, PartialEq)]
#[cfg_attr(
feature = "rkyv",
derive(rkyv::Archive, rkyv::Serialize, rkyv::Deserialize)
)]
pub struct DaycoreOsu {
pub speed_change: Option<f64>,
}
#[derive(Copy, Eq, Clone, Debug, Default, PartialEq)]
#[cfg_attr(feature = "rkyv", derive(rkyv::Archive, rkyv::Serialize, rkyv::Deserialize,rkyv::Portable,rkyv::bytecheck::CheckBytes,),bytecheck(crate = rkyv::bytecheck),rkyv(as = Self), repr(transparent))]
pub struct HardRockOsu {}
#[derive(Clone, Debug, Default, PartialEq)]
#[cfg_attr(
feature = "rkyv",
derive(rkyv::Archive, rkyv::Serialize, rkyv::Deserialize)
)]
pub struct SuddenDeathOsu {
pub restart: Option<bool>,
}
#[derive(Clone, Debug, Default, PartialEq)]
#[cfg_attr(
feature = "rkyv",
derive(rkyv::Archive, rkyv::Serialize, rkyv::Deserialize)
)]
pub struct PerfectOsu {
pub restart: Option<bool>,
}
#[derive(Clone, Debug, Default, PartialEq)]
#[cfg_attr(
feature = "rkyv",
derive(rkyv::Archive, rkyv::Serialize, rkyv::Deserialize)
)]
pub struct DoubleTimeOsu {
pub speed_change: Option<f64>,
pub adjust_pitch: Option<bool>,
}
#[derive(Clone, Debug, Default, PartialEq)]
#[cfg_attr(
feature = "rkyv",
derive(rkyv::Archive, rkyv::Serialize, rkyv::Deserialize)
)]
pub struct NightcoreOsu {
pub speed_change: Option<f64>,
}
#[derive(Clone, Debug, Default, PartialEq)]
#[cfg_attr(
feature = "rkyv",
derive(rkyv::Archive, rkyv::Serialize, rkyv::Deserialize)
)]
pub struct HiddenOsu {
pub only_fade_approach_circles: Option<bool>,
}
#[derive(Clone, Debug, Default, PartialEq)]
#[cfg_attr(
feature = "rkyv",
derive(rkyv::Archive, rkyv::Serialize, rkyv::Deserialize)
)]
pub struct FlashlightOsu {
pub follow_delay: Option<f64>,
pub size_multiplier: Option<f64>,
pub combo_based_size: Option<bool>,
}
#[derive(Copy, Eq, Clone, Debug, Default, PartialEq)]
#[cfg_attr(feature = "rkyv", derive(rkyv::Archive, rkyv::Serialize, rkyv::Deserialize,rkyv::Portable,rkyv::bytecheck::CheckBytes,),bytecheck(crate = rkyv::bytecheck),rkyv(as = Self), repr(transparent))]
pub struct BlindsOsu {}
#[derive(Copy, Eq, Clone, Debug, Default, PartialEq)]
#[cfg_attr(feature = "rkyv", derive(rkyv::Archive, rkyv::Serialize, rkyv::Deserialize,rkyv::Portable,rkyv::bytecheck::CheckBytes,),bytecheck(crate = rkyv::bytecheck),rkyv(as = Self), repr(transparent))]
pub struct StrictTrackingOsu {}
#[derive(Clone, Debug, Default, PartialEq)]
#[cfg_attr(
feature = "rkyv",
derive(rkyv::Archive, rkyv::Serialize, rkyv::Deserialize)
)]
pub struct AccuracyChallengeOsu {
pub minimum_accuracy: Option<f64>,
pub accuracy_judge_mode: Option<String>,
pub restart: Option<bool>,
}
#[derive(Clone, Debug, Default, PartialEq)]
#[cfg_attr(
feature = "rkyv",
derive(rkyv::Archive, rkyv::Serialize, rkyv::Deserialize)
)]
pub struct TargetPracticeOsu {
pub seed: Option<f64>,
pub metronome: Option<bool>,
}
#[derive(Clone, Debug, Default, PartialEq)]
#[cfg_attr(
feature = "rkyv",
derive(rkyv::Archive, rkyv::Serialize, rkyv::Deserialize)
)]
pub struct DifficultyAdjustOsu {
pub circle_size: Option<f64>,
pub approach_rate: Option<f64>,
pub drain_rate: Option<f64>,
pub overall_difficulty: Option<f64>,
pub extended_limits: Option<bool>,
}
#[derive(Clone, Debug, Default, PartialEq)]
#[cfg_attr(
feature = "rkyv",
derive(rkyv::Archive, rkyv::Serialize, rkyv::Deserialize)
)]
pub struct ClassicOsu {
pub no_slider_head_accuracy: Option<bool>,
pub classic_note_lock: Option<bool>,
pub always_play_tail_sample: Option<bool>,
pub fade_hit_circle_early: Option<bool>,
pub classic_health: Option<bool>,
}
#[derive(Clone, Debug, Default, PartialEq)]
#[cfg_attr(
feature = "rkyv",
derive(rkyv::Archive, rkyv::Serialize, rkyv::Deserialize)
)]
pub struct RandomOsu {
pub angle_sharpness: Option<f64>,
pub seed: Option<f64>,
}
#[derive(Clone, Debug, Default, PartialEq)]
#[cfg_attr(
feature = "rkyv",
derive(rkyv::Archive, rkyv::Serialize, rkyv::Deserialize)
)]
pub struct MirrorOsu {
pub reflection: Option<String>,
}
#[derive(Copy, Eq, Clone, Debug, Default, PartialEq)]
#[cfg_attr(feature = "rkyv", derive(rkyv::Archive, rkyv::Serialize, rkyv::Deserialize,rkyv::Portable,rkyv::bytecheck::CheckBytes,),bytecheck(crate = rkyv::bytecheck),rkyv(as = Self), repr(transparent))]
pub struct AlternateOsu {}
#[derive(Copy, Eq, Clone, Debug, Default, PartialEq)]
#[cfg_attr(feature = "rkyv", derive(rkyv::Archive, rkyv::Serialize, rkyv::Deserialize,rkyv::Portable,rkyv::bytecheck::CheckBytes,),bytecheck(crate = rkyv::bytecheck),rkyv(as = Self), repr(transparent))]
pub struct SingleTapOsu {}
#[derive(Copy, Eq, Clone, Debug, Default, PartialEq)]
#[cfg_attr(feature = "rkyv", derive(rkyv::Archive, rkyv::Serialize, rkyv::Deserialize,rkyv::Portable,rkyv::bytecheck::CheckBytes,),bytecheck(crate = rkyv::bytecheck),rkyv(as = Self), repr(transparent))]
pub struct AutoplayOsu {}
#[derive(Copy, Eq, Clone, Debug, Default, PartialEq)]
#[cfg_attr(feature = "rkyv", derive(rkyv::Archive, rkyv::Serialize, rkyv::Deserialize,rkyv::Portable,rkyv::bytecheck::CheckBytes,),bytecheck(crate = rkyv::bytecheck),rkyv(as = Self), repr(transparent))]
pub struct CinemaOsu {}
#[derive(Copy, Eq, Clone, Debug, Default, PartialEq)]
#[cfg_attr(feature = "rkyv", derive(rkyv::Archive, rkyv::Serialize, rkyv::Deserialize,rkyv::Portable,rkyv::bytecheck::CheckBytes,),bytecheck(crate = rkyv::bytecheck),rkyv(as = Self), repr(transparent))]
pub struct RelaxOsu {}
#[derive(Copy, Eq, Clone, Debug, Default, PartialEq)]
#[cfg_attr(feature = "rkyv", derive(rkyv::Archive, rkyv::Serialize, rkyv::Deserialize,rkyv::Portable,rkyv::bytecheck::CheckBytes,),bytecheck(crate = rkyv::bytecheck),rkyv(as = Self), repr(transparent))]
pub struct AutopilotOsu {}
#[derive(Copy, Eq, Clone, Debug, Default, PartialEq)]
#[cfg_attr(feature = "rkyv", derive(rkyv::Archive, rkyv::Serialize, rkyv::Deserialize,rkyv::Portable,rkyv::bytecheck::CheckBytes,),bytecheck(crate = rkyv::bytecheck),rkyv(as = Self), repr(transparent))]
pub struct SpunOutOsu {}
#[derive(Copy, Eq, Clone, Debug, Default, PartialEq)]
#[cfg_attr(feature = "rkyv", derive(rkyv::Archive, rkyv::Serialize, rkyv::Deserialize,rkyv::Portable,rkyv::bytecheck::CheckBytes,),bytecheck(crate = rkyv::bytecheck),rkyv(as = Self), repr(transparent))]
pub struct TransformOsu {}
#[derive(Clone, Debug, Default, PartialEq)]
#[cfg_attr(
feature = "rkyv",
derive(rkyv::Archive, rkyv::Serialize, rkyv::Deserialize)
)]
pub struct WiggleOsu {
pub strength: Option<f64>,
}
#[derive(Copy, Eq, Clone, Debug, Default, PartialEq)]
#[cfg_attr(feature = "rkyv", derive(rkyv::Archive, rkyv::Serialize, rkyv::Deserialize,rkyv::Portable,rkyv::bytecheck::CheckBytes,),bytecheck(crate = rkyv::bytecheck),rkyv(as = Self), repr(transparent))]
pub struct SpinInOsu {}
#[derive(Clone, Debug, Default, PartialEq)]
#[cfg_attr(
feature = "rkyv",
derive(rkyv::Archive, rkyv::Serialize, rkyv::Deserialize)
)]
pub struct GrowOsu {
pub start_scale: Option<f64>,
}
#[derive(Clone, Debug, Default, PartialEq)]
#[cfg_attr(
feature = "rkyv",
derive(rkyv::Archive, rkyv::Serialize, rkyv::Deserialize)
)]
pub struct DeflateOsu {
pub start_scale: Option<f64>,
}
#[derive(Clone, Debug, Default, PartialEq)]
#[cfg_attr(
feature = "rkyv",
derive(rkyv::Archive, rkyv::Serialize, rkyv::Deserialize)
)]
pub struct WindUpOsu {
pub initial_rate: Option<f64>,
pub final_rate: Option<f64>,
pub adjust_pitch: Option<bool>,
}
#[derive(Clone, Debug, Default, PartialEq)]
#[cfg_attr(
feature = "rkyv",
derive(rkyv::Archive, rkyv::Serialize, rkyv::Deserialize)
)]
pub struct WindDownOsu {
pub initial_rate: Option<f64>,
pub final_rate: Option<f64>,
pub adjust_pitch: Option<bool>,
}
#[derive(Copy, Eq, Clone, Debug, Default, PartialEq)]
#[cfg_attr(feature = "rkyv", derive(rkyv::Archive, rkyv::Serialize, rkyv::Deserialize,rkyv::Portable,rkyv::bytecheck::CheckBytes,),bytecheck(crate = rkyv::bytecheck),rkyv(as = Self), repr(transparent))]
pub struct TraceableOsu {}
#[derive(Clone, Debug, Default, PartialEq)]
#[cfg_attr(
feature = "rkyv",
derive(rkyv::Archive, rkyv::Serialize, rkyv::Deserialize)
)]
pub struct BarrelRollOsu {
pub spin_speed: Option<f64>,
pub direction: Option<String>,
}
#[derive(Clone, Debug, Default, PartialEq)]
#[cfg_attr(
feature = "rkyv",
derive(rkyv::Archive, rkyv::Serialize, rkyv::Deserialize)
)]
pub struct ApproachDifferentOsu {
pub scale: Option<f64>,
pub style: Option<String>,
}
#[derive(Clone, Debug, Default, PartialEq)]
#[cfg_attr(
feature = "rkyv",
derive(rkyv::Archive, rkyv::Serialize, rkyv::Deserialize)
)]
pub struct MutedOsu {
pub inverse_muting: Option<bool>,
pub enable_metronome: Option<bool>,
pub mute_combo_count: Option<f64>,
pub affects_hit_sounds: Option<bool>,
}
#[derive(Clone, Debug, Default, PartialEq)]
#[cfg_attr(
feature = "rkyv",
derive(rkyv::Archive, rkyv::Serialize, rkyv::Deserialize)
)]
pub struct NoScopeOsu {
pub hidden_combo_count: Option<f64>,
}
#[derive(Clone, Debug, Default, PartialEq)]
#[cfg_attr(
feature = "rkyv",
derive(rkyv::Archive, rkyv::Serialize, rkyv::Deserialize)
)]
pub struct MagnetisedOsu {
pub attraction_strength: Option<f64>,
}
#[derive(Clone, Debug, Default, PartialEq)]
#[cfg_attr(
feature = "rkyv",
derive(rkyv::Archive, rkyv::Serialize, rkyv::Deserialize)
)]
pub struct RepelOsu {
pub repulsion_strength: Option<f64>,
}
#[derive(Clone, Debug, Default, PartialEq)]
#[cfg_attr(
feature = "rkyv",
derive(rkyv::Archive, rkyv::Serialize, rkyv::Deserialize)
)]
pub struct AdaptiveSpeedOsu {
pub initial_rate: Option<f64>,
pub adjust_pitch: Option<bool>,
}
#[derive(Copy, Eq, Clone, Debug, Default, PartialEq)]
#[cfg_attr(feature = "rkyv", derive(rkyv::Archive, rkyv::Serialize, rkyv::Deserialize,rkyv::Portable,rkyv::bytecheck::CheckBytes,),bytecheck(crate = rkyv::bytecheck),rkyv(as = Self), repr(transparent))]
pub struct FreezeFrameOsu {}
#[derive(Copy, Eq, Clone, Debug, Default, PartialEq)]
#[cfg_attr(feature = "rkyv", derive(rkyv::Archive, rkyv::Serialize, rkyv::Deserialize,rkyv::Portable,rkyv::bytecheck::CheckBytes,),bytecheck(crate = rkyv::bytecheck),rkyv(as = Self), repr(transparent))]
pub struct BubblesOsu {}
#[derive(Copy, Eq, Clone, Debug, Default, PartialEq)]
#[cfg_attr(feature = "rkyv", derive(rkyv::Archive, rkyv::Serialize, rkyv::Deserialize,rkyv::Portable,rkyv::bytecheck::CheckBytes,),bytecheck(crate = rkyv::bytecheck),rkyv(as = Self), repr(transparent))]
pub struct SynesthesiaOsu {}
#[derive(Clone, Debug, Default, PartialEq)]
#[cfg_attr(
feature = "rkyv",
derive(rkyv::Archive, rkyv::Serialize, rkyv::Deserialize)
)]
pub struct DepthOsu {
pub max_depth: Option<f64>,
pub show_approach_circles: Option<bool>,
}
#[derive(Copy, Eq, Clone, Debug, Default, PartialEq)]
#[cfg_attr(feature = "rkyv", derive(rkyv::Archive, rkyv::Serialize, rkyv::Deserialize,rkyv::Portable,rkyv::bytecheck::CheckBytes,),bytecheck(crate = rkyv::bytecheck),rkyv(as = Self), repr(transparent))]
pub struct TouchDeviceOsu {}
#[derive(Copy, Eq, Clone, Debug, Default, PartialEq)]
#[cfg_attr(feature = "rkyv", derive(rkyv::Archive, rkyv::Serialize, rkyv::Deserialize,rkyv::Portable,rkyv::bytecheck::CheckBytes,),bytecheck(crate = rkyv::bytecheck),rkyv(as = Self), repr(transparent))]
pub struct ScoreV2Osu {}
#[derive(Copy, Eq, Clone, Debug, Default, PartialEq)]
#[cfg_attr(feature = "rkyv", derive(rkyv::Archive, rkyv::Serialize, rkyv::Deserialize,rkyv::Portable,rkyv::bytecheck::CheckBytes,),bytecheck(crate = rkyv::bytecheck),rkyv(as = Self), repr(transparent))]
pub struct EasyTaiko {}
#[derive(Copy, Eq, Clone, Debug, Default, PartialEq)]
#[cfg_attr(feature = "rkyv", derive(rkyv::Archive, rkyv::Serialize, rkyv::Deserialize,rkyv::Portable,rkyv::bytecheck::CheckBytes,),bytecheck(crate = rkyv::bytecheck),rkyv(as = Self), repr(transparent))]
pub struct NoFailTaiko {}
#[derive(Clone, Debug, Default, PartialEq)]
#[cfg_attr(
feature = "rkyv",
derive(rkyv::Archive, rkyv::Serialize, rkyv::Deserialize)
)]
pub struct HalfTimeTaiko {
pub speed_change: Option<f64>,
pub adjust_pitch: Option<bool>,
}
#[derive(Clone, Debug, Default, PartialEq)]
#[cfg_attr(
feature = "rkyv",
derive(rkyv::Archive, rkyv::Serialize, rkyv::Deserialize)
)]
pub struct DaycoreTaiko {
pub speed_change: Option<f64>,
}
#[derive(Copy, Eq, Clone, Debug, Default, PartialEq)]
#[cfg_attr(feature = "rkyv", derive(rkyv::Archive, rkyv::Serialize, rkyv::Deserialize,rkyv::Portable,rkyv::bytecheck::CheckBytes,),bytecheck(crate = rkyv::bytecheck),rkyv(as = Self), repr(transparent))]
pub struct HardRockTaiko {}
#[derive(Clone, Debug, Default, PartialEq)]
#[cfg_attr(
feature = "rkyv",
derive(rkyv::Archive, rkyv::Serialize, rkyv::Deserialize)
)]
pub struct SuddenDeathTaiko {
pub restart: Option<bool>,
}
#[derive(Clone, Debug, Default, PartialEq)]
#[cfg_attr(
feature = "rkyv",
derive(rkyv::Archive, rkyv::Serialize, rkyv::Deserialize)
)]
pub struct PerfectTaiko {
pub restart: Option<bool>,
}
#[derive(Clone, Debug, Default, PartialEq)]
#[cfg_attr(
feature = "rkyv",
derive(rkyv::Archive, rkyv::Serialize, rkyv::Deserialize)
)]
pub struct DoubleTimeTaiko {
pub speed_change: Option<f64>,
pub adjust_pitch: Option<bool>,
}
#[derive(Clone, Debug, Default, PartialEq)]
#[cfg_attr(
feature = "rkyv",
derive(rkyv::Archive, rkyv::Serialize, rkyv::Deserialize)
)]
pub struct NightcoreTaiko {
pub speed_change: Option<f64>,
}
#[derive(Copy, Eq, Clone, Debug, Default, PartialEq)]
#[cfg_attr(feature = "rkyv", derive(rkyv::Archive, rkyv::Serialize, rkyv::Deserialize,rkyv::Portable,rkyv::bytecheck::CheckBytes,),bytecheck(crate = rkyv::bytecheck),rkyv(as = Self), repr(transparent))]
pub struct HiddenTaiko {}
#[derive(Clone, Debug, Default, PartialEq)]
#[cfg_attr(
feature = "rkyv",
derive(rkyv::Archive, rkyv::Serialize, rkyv::Deserialize)
)]
pub struct FlashlightTaiko {
pub size_multiplier: Option<f64>,
pub combo_based_size: Option<bool>,
}
#[derive(Clone, Debug, Default, PartialEq)]
#[cfg_attr(
feature = "rkyv",
derive(rkyv::Archive, rkyv::Serialize, rkyv::Deserialize)
)]
pub struct AccuracyChallengeTaiko {
pub minimum_accuracy: Option<f64>,
pub accuracy_judge_mode: Option<String>,
pub restart: Option<bool>,
}
#[derive(Clone, Debug, Default, PartialEq)]
#[cfg_attr(
feature = "rkyv",
derive(rkyv::Archive, rkyv::Serialize, rkyv::Deserialize)
)]
pub struct RandomTaiko {
pub seed: Option<f64>,
}
#[derive(Clone, Debug, Default, PartialEq)]
#[cfg_attr(
feature = "rkyv",
derive(rkyv::Archive, rkyv::Serialize, rkyv::Deserialize)
)]
pub struct DifficultyAdjustTaiko {
pub scroll_speed: Option<f64>,
pub drain_rate: Option<f64>,
pub overall_difficulty: Option<f64>,
pub extended_limits: Option<bool>,
}
#[derive(Copy, Eq, Clone, Debug, Default, PartialEq)]
#[cfg_attr(feature = "rkyv", derive(rkyv::Archive, rkyv::Serialize, rkyv::Deserialize,rkyv::Portable,rkyv::bytecheck::CheckBytes,),bytecheck(crate = rkyv::bytecheck),rkyv(as = Self), repr(transparent))]
pub struct ClassicTaiko {}
#[derive(Copy, Eq, Clone, Debug, Default, PartialEq)]
#[cfg_attr(feature = "rkyv", derive(rkyv::Archive, rkyv::Serialize, rkyv::Deserialize,rkyv::Portable,rkyv::bytecheck::CheckBytes,),bytecheck(crate = rkyv::bytecheck),rkyv(as = Self), repr(transparent))]
pub struct SwapTaiko {}
#[derive(Copy, Eq, Clone, Debug, Default, PartialEq)]
#[cfg_attr(feature = "rkyv", derive(rkyv::Archive, rkyv::Serialize, rkyv::Deserialize,rkyv::Portable,rkyv::bytecheck::CheckBytes,),bytecheck(crate = rkyv::bytecheck),rkyv(as = Self), repr(transparent))]
pub struct SingleTapTaiko {}
#[derive(Copy, Eq, Clone, Debug, Default, PartialEq)]
#[cfg_attr(feature = "rkyv", derive(rkyv::Archive, rkyv::Serialize, rkyv::Deserialize,rkyv::Portable,rkyv::bytecheck::CheckBytes,),bytecheck(crate = rkyv::bytecheck),rkyv(as = Self), repr(transparent))]
pub struct ConstantSpeedTaiko {}
#[derive(Copy, Eq, Clone, Debug, Default, PartialEq)]
#[cfg_attr(feature = "rkyv", derive(rkyv::Archive, rkyv::Serialize, rkyv::Deserialize,rkyv::Portable,rkyv::bytecheck::CheckBytes,),bytecheck(crate = rkyv::bytecheck),rkyv(as = Self), repr(transparent))]
pub struct AutoplayTaiko {}
#[derive(Copy, Eq, Clone, Debug, Default, PartialEq)]
#[cfg_attr(feature = "rkyv", derive(rkyv::Archive, rkyv::Serialize, rkyv::Deserialize,rkyv::Portable,rkyv::bytecheck::CheckBytes,),bytecheck(crate = rkyv::bytecheck),rkyv(as = Self), repr(transparent))]
pub struct CinemaTaiko {}
#[derive(Copy, Eq, Clone, Debug, Default, PartialEq)]
#[cfg_attr(feature = "rkyv", derive(rkyv::Archive, rkyv::Serialize, rkyv::Deserialize,rkyv::Portable,rkyv::bytecheck::CheckBytes,),bytecheck(crate = rkyv::bytecheck),rkyv(as = Self), repr(transparent))]
pub struct RelaxTaiko {}
#[derive(Clone, Debug, Default, PartialEq)]
#[cfg_attr(
feature = "rkyv",
derive(rkyv::Archive, rkyv::Serialize, rkyv::Deserialize)
)]
pub struct WindUpTaiko {
pub initial_rate: Option<f64>,
pub final_rate: Option<f64>,
pub adjust_pitch: Option<bool>,
}
#[derive(Clone, Debug, Default, PartialEq)]
#[cfg_attr(
feature = "rkyv",
derive(rkyv::Archive, rkyv::Serialize, rkyv::Deserialize)
)]
pub struct WindDownTaiko {
pub initial_rate: Option<f64>,
pub final_rate: Option<f64>,
pub adjust_pitch: Option<bool>,
}
#[derive(Clone, Debug, Default, PartialEq)]
#[cfg_attr(
feature = "rkyv",
derive(rkyv::Archive, rkyv::Serialize, rkyv::Deserialize)
)]
pub struct MutedTaiko {
pub inverse_muting: Option<bool>,
pub enable_metronome: Option<bool>,
pub mute_combo_count: Option<f64>,
pub affects_hit_sounds: Option<bool>,
}
#[derive(Clone, Debug, Default, PartialEq)]
#[cfg_attr(
feature = "rkyv",
derive(rkyv::Archive, rkyv::Serialize, rkyv::Deserialize)
)]
pub struct AdaptiveSpeedTaiko {
pub initial_rate: Option<f64>,
pub adjust_pitch: Option<bool>,
}
#[derive(Copy, Eq, Clone, Debug, Default, PartialEq)]
#[cfg_attr(feature = "rkyv", derive(rkyv::Archive, rkyv::Serialize, rkyv::Deserialize,rkyv::Portable,rkyv::bytecheck::CheckBytes,),bytecheck(crate = rkyv::bytecheck),rkyv(as = Self), repr(transparent))]
pub struct ScoreV2Taiko {}
#[derive(Clone, Debug, Default, PartialEq)]
#[cfg_attr(
feature = "rkyv",
derive(rkyv::Archive, rkyv::Serialize, rkyv::Deserialize)
)]
pub struct EasyCatch {
pub retries: Option<f64>,
}
#[derive(Copy, Eq, Clone, Debug, Default, PartialEq)]
#[cfg_attr(feature = "rkyv", derive(rkyv::Archive, rkyv::Serialize, rkyv::Deserialize,rkyv::Portable,rkyv::bytecheck::CheckBytes,),bytecheck(crate = rkyv::bytecheck),rkyv(as = Self), repr(transparent))]
pub struct NoFailCatch {}
#[derive(Clone, Debug, Default, PartialEq)]
#[cfg_attr(
feature = "rkyv",
derive(rkyv::Archive, rkyv::Serialize, rkyv::Deserialize)
)]
pub struct HalfTimeCatch {
pub speed_change: Option<f64>,
pub adjust_pitch: Option<bool>,
}
#[derive(Clone, Debug, Default, PartialEq)]
#[cfg_attr(
feature = "rkyv",
derive(rkyv::Archive, rkyv::Serialize, rkyv::Deserialize)
)]
pub struct DaycoreCatch {
pub speed_change: Option<f64>,
}
#[derive(Copy, Eq, Clone, Debug, Default, PartialEq)]
#[cfg_attr(feature = "rkyv", derive(rkyv::Archive, rkyv::Serialize, rkyv::Deserialize,rkyv::Portable,rkyv::bytecheck::CheckBytes,),bytecheck(crate = rkyv::bytecheck),rkyv(as = Self), repr(transparent))]
pub struct HardRockCatch {}
#[derive(Clone, Debug, Default, PartialEq)]
#[cfg_attr(
feature = "rkyv",
derive(rkyv::Archive, rkyv::Serialize, rkyv::Deserialize)
)]
pub struct SuddenDeathCatch {
pub restart: Option<bool>,
}
#[derive(Clone, Debug, Default, PartialEq)]
#[cfg_attr(
feature = "rkyv",
derive(rkyv::Archive, rkyv::Serialize, rkyv::Deserialize)
)]
pub struct PerfectCatch {
pub restart: Option<bool>,
}
#[derive(Clone, Debug, Default, PartialEq)]
#[cfg_attr(
feature = "rkyv",
derive(rkyv::Archive, rkyv::Serialize, rkyv::Deserialize)
)]
pub struct DoubleTimeCatch {
pub speed_change: Option<f64>,
pub adjust_pitch: Option<bool>,
}
#[derive(Clone, Debug, Default, PartialEq)]
#[cfg_attr(
feature = "rkyv",
derive(rkyv::Archive, rkyv::Serialize, rkyv::Deserialize)
)]
pub struct NightcoreCatch {
pub speed_change: Option<f64>,
}
#[derive(Copy, Eq, Clone, Debug, Default, PartialEq)]
#[cfg_attr(feature = "rkyv", derive(rkyv::Archive, rkyv::Serialize, rkyv::Deserialize,rkyv::Portable,rkyv::bytecheck::CheckBytes,),bytecheck(crate = rkyv::bytecheck),rkyv(as = Self), repr(transparent))]
pub struct HiddenCatch {}
#[derive(Clone, Debug, Default, PartialEq)]
#[cfg_attr(
feature = "rkyv",
derive(rkyv::Archive, rkyv::Serialize, rkyv::Deserialize)
)]
pub struct FlashlightCatch {
pub size_multiplier: Option<f64>,
pub combo_based_size: Option<bool>,
}
#[derive(Clone, Debug, Default, PartialEq)]
#[cfg_attr(
feature = "rkyv",
derive(rkyv::Archive, rkyv::Serialize, rkyv::Deserialize)
)]
pub struct AccuracyChallengeCatch {
pub minimum_accuracy: Option<f64>,
pub accuracy_judge_mode: Option<String>,
pub restart: Option<bool>,
}
#[derive(Clone, Debug, Default, PartialEq)]
#[cfg_attr(
feature = "rkyv",
derive(rkyv::Archive, rkyv::Serialize, rkyv::Deserialize)
)]
pub struct DifficultyAdjustCatch {
pub circle_size: Option<f64>,
pub approach_rate: Option<f64>,
pub hard_rock_offsets: Option<bool>,
pub drain_rate: Option<f64>,
pub overall_difficulty: Option<f64>,
pub extended_limits: Option<bool>,
}
#[derive(Copy, Eq, Clone, Debug, Default, PartialEq)]
#[cfg_attr(feature = "rkyv", derive(rkyv::Archive, rkyv::Serialize, rkyv::Deserialize,rkyv::Portable,rkyv::bytecheck::CheckBytes,),bytecheck(crate = rkyv::bytecheck),rkyv(as = Self), repr(transparent))]
pub struct ClassicCatch {}
#[derive(Copy, Eq, Clone, Debug, Default, PartialEq)]
#[cfg_attr(feature = "rkyv", derive(rkyv::Archive, rkyv::Serialize, rkyv::Deserialize,rkyv::Portable,rkyv::bytecheck::CheckBytes,),bytecheck(crate = rkyv::bytecheck),rkyv(as = Self), repr(transparent))]
pub struct MirrorCatch {}
#[derive(Copy, Eq, Clone, Debug, Default, PartialEq)]
#[cfg_attr(feature = "rkyv", derive(rkyv::Archive, rkyv::Serialize, rkyv::Deserialize,rkyv::Portable,rkyv::bytecheck::CheckBytes,),bytecheck(crate = rkyv::bytecheck),rkyv(as = Self), repr(transparent))]
pub struct AutoplayCatch {}
#[derive(Copy, Eq, Clone, Debug, Default, PartialEq)]
#[cfg_attr(feature = "rkyv", derive(rkyv::Archive, rkyv::Serialize, rkyv::Deserialize,rkyv::Portable,rkyv::bytecheck::CheckBytes,),bytecheck(crate = rkyv::bytecheck),rkyv(as = Self), repr(transparent))]
pub struct CinemaCatch {}
#[derive(Copy, Eq, Clone, Debug, Default, PartialEq)]
#[cfg_attr(feature = "rkyv", derive(rkyv::Archive, rkyv::Serialize, rkyv::Deserialize,rkyv::Portable,rkyv::bytecheck::CheckBytes,),bytecheck(crate = rkyv::bytecheck),rkyv(as = Self), repr(transparent))]
pub struct RelaxCatch {}
#[derive(Clone, Debug, Default, PartialEq)]
#[cfg_attr(
feature = "rkyv",
derive(rkyv::Archive, rkyv::Serialize, rkyv::Deserialize)
)]
pub struct WindUpCatch {
pub initial_rate: Option<f64>,
pub final_rate: Option<f64>,
pub adjust_pitch: Option<bool>,
}
#[derive(Clone, Debug, Default, PartialEq)]
#[cfg_attr(
feature = "rkyv",
derive(rkyv::Archive, rkyv::Serialize, rkyv::Deserialize)
)]
pub struct WindDownCatch {
pub initial_rate: Option<f64>,
pub final_rate: Option<f64>,
pub adjust_pitch: Option<bool>,
}
#[derive(Copy, Eq, Clone, Debug, Default, PartialEq)]
#[cfg_attr(feature = "rkyv", derive(rkyv::Archive, rkyv::Serialize, rkyv::Deserialize,rkyv::Portable,rkyv::bytecheck::CheckBytes,),bytecheck(crate = rkyv::bytecheck),rkyv(as = Self), repr(transparent))]
pub struct FloatingFruitsCatch {}
#[derive(Clone, Debug, Default, PartialEq)]
#[cfg_attr(
feature = "rkyv",
derive(rkyv::Archive, rkyv::Serialize, rkyv::Deserialize)
)]
pub struct MutedCatch {
pub inverse_muting: Option<bool>,
pub enable_metronome: Option<bool>,
pub mute_combo_count: Option<f64>,
pub affects_hit_sounds: Option<bool>,
}
#[derive(Clone, Debug, Default, PartialEq)]
#[cfg_attr(
feature = "rkyv",
derive(rkyv::Archive, rkyv::Serialize, rkyv::Deserialize)
)]
pub struct NoScopeCatch {
pub hidden_combo_count: Option<f64>,
}
#[derive(Copy, Eq, Clone, Debug, Default, PartialEq)]
#[cfg_attr(feature = "rkyv", derive(rkyv::Archive, rkyv::Serialize, rkyv::Deserialize,rkyv::Portable,rkyv::bytecheck::CheckBytes,),bytecheck(crate = rkyv::bytecheck),rkyv(as = Self), repr(transparent))]
pub struct ScoreV2Catch {}
#[derive(Clone, Debug, Default, PartialEq)]
#[cfg_attr(
feature = "rkyv",
derive(rkyv::Archive, rkyv::Serialize, rkyv::Deserialize)
)]
pub struct EasyMania {
pub retries: Option<f64>,
}
#[derive(Copy, Eq, Clone, Debug, Default, PartialEq)]
#[cfg_attr(feature = "rkyv", derive(rkyv::Archive, rkyv::Serialize, rkyv::Deserialize,rkyv::Portable,rkyv::bytecheck::CheckBytes,),bytecheck(crate = rkyv::bytecheck),rkyv(as = Self), repr(transparent))]
pub struct NoFailMania {}
#[derive(Clone, Debug, Default, PartialEq)]
#[cfg_attr(
feature = "rkyv",
derive(rkyv::Archive, rkyv::Serialize, rkyv::Deserialize)
)]
pub struct HalfTimeMania {
pub speed_change: Option<f64>,
pub adjust_pitch: Option<bool>,
}
#[derive(Clone, Debug, Default, PartialEq)]
#[cfg_attr(
feature = "rkyv",
derive(rkyv::Archive, rkyv::Serialize, rkyv::Deserialize)
)]
pub struct DaycoreMania {
pub speed_change: Option<f64>,
}
#[derive(Copy, Eq, Clone, Debug, Default, PartialEq)]
#[cfg_attr(feature = "rkyv", derive(rkyv::Archive, rkyv::Serialize, rkyv::Deserialize,rkyv::Portable,rkyv::bytecheck::CheckBytes,),bytecheck(crate = rkyv::bytecheck),rkyv(as = Self), repr(transparent))]
pub struct NoReleaseMania {}
#[derive(Copy, Eq, Clone, Debug, Default, PartialEq)]
#[cfg_attr(feature = "rkyv", derive(rkyv::Archive, rkyv::Serialize, rkyv::Deserialize,rkyv::Portable,rkyv::bytecheck::CheckBytes,),bytecheck(crate = rkyv::bytecheck),rkyv(as = Self), repr(transparent))]
pub struct HardRockMania {}
#[derive(Clone, Debug, Default, PartialEq)]
#[cfg_attr(
feature = "rkyv",
derive(rkyv::Archive, rkyv::Serialize, rkyv::Deserialize)
)]
pub struct SuddenDeathMania {
pub restart: Option<bool>,
}
#[derive(Clone, Debug, Default, PartialEq)]
#[cfg_attr(
feature = "rkyv",
derive(rkyv::Archive, rkyv::Serialize, rkyv::Deserialize)
)]
pub struct PerfectMania {
pub restart: Option<bool>,
}
#[derive(Clone, Debug, Default, PartialEq)]
#[cfg_attr(
feature = "rkyv",
derive(rkyv::Archive, rkyv::Serialize, rkyv::Deserialize)
)]
pub struct DoubleTimeMania {
pub speed_change: Option<f64>,
pub adjust_pitch: Option<bool>,
}
#[derive(Clone, Debug, Default, PartialEq)]
#[cfg_attr(
feature = "rkyv",
derive(rkyv::Archive, rkyv::Serialize, rkyv::Deserialize)
)]
pub struct NightcoreMania {
pub speed_change: Option<f64>,
}
#[derive(Copy, Eq, Clone, Debug, Default, PartialEq)]
#[cfg_attr(feature = "rkyv", derive(rkyv::Archive, rkyv::Serialize, rkyv::Deserialize,rkyv::Portable,rkyv::bytecheck::CheckBytes,),bytecheck(crate = rkyv::bytecheck),rkyv(as = Self), repr(transparent))]
pub struct FadeInMania {}
#[derive(Copy, Eq, Clone, Debug, Default, PartialEq)]
#[cfg_attr(feature = "rkyv", derive(rkyv::Archive, rkyv::Serialize, rkyv::Deserialize,rkyv::Portable,rkyv::bytecheck::CheckBytes,),bytecheck(crate = rkyv::bytecheck),rkyv(as = Self), repr(transparent))]
pub struct HiddenMania {}
#[derive(Clone, Debug, Default, PartialEq)]
#[cfg_attr(
feature = "rkyv",
derive(rkyv::Archive, rkyv::Serialize, rkyv::Deserialize)
)]
pub struct CoverMania {
pub coverage: Option<f64>,
pub direction: Option<String>,
}
#[derive(Clone, Debug, Default, PartialEq)]
#[cfg_attr(
feature = "rkyv",
derive(rkyv::Archive, rkyv::Serialize, rkyv::Deserialize)
)]
pub struct FlashlightMania {
pub size_multiplier: Option<f64>,
pub combo_based_size: Option<bool>,
}
#[derive(Clone, Debug, Default, PartialEq)]
#[cfg_attr(
feature = "rkyv",
derive(rkyv::Archive, rkyv::Serialize, rkyv::Deserialize)
)]
pub struct AccuracyChallengeMania {
pub minimum_accuracy: Option<f64>,
pub accuracy_judge_mode: Option<String>,
pub restart: Option<bool>,
}
#[derive(Clone, Debug, Default, PartialEq)]
#[cfg_attr(
feature = "rkyv",
derive(rkyv::Archive, rkyv::Serialize, rkyv::Deserialize)
)]
pub struct RandomMania {
pub seed: Option<f64>,
}
#[derive(Copy, Eq, Clone, Debug, Default, PartialEq)]
#[cfg_attr(feature = "rkyv", derive(rkyv::Archive, rkyv::Serialize, rkyv::Deserialize,rkyv::Portable,rkyv::bytecheck::CheckBytes,),bytecheck(crate = rkyv::bytecheck),rkyv(as = Self), repr(transparent))]
pub struct DualStagesMania {}
#[derive(Copy, Eq, Clone, Debug, Default, PartialEq)]
#[cfg_attr(feature = "rkyv", derive(rkyv::Archive, rkyv::Serialize, rkyv::Deserialize,rkyv::Portable,rkyv::bytecheck::CheckBytes,),bytecheck(crate = rkyv::bytecheck),rkyv(as = Self), repr(transparent))]
pub struct MirrorMania {}
#[derive(Clone, Debug, Default, PartialEq)]
#[cfg_attr(
feature = "rkyv",
derive(rkyv::Archive, rkyv::Serialize, rkyv::Deserialize)
)]
pub struct DifficultyAdjustMania {
pub drain_rate: Option<f64>,
pub overall_difficulty: Option<f64>,
pub extended_limits: Option<bool>,
}
#[derive(Copy, Eq, Clone, Debug, Default, PartialEq)]
#[cfg_attr(feature = "rkyv", derive(rkyv::Archive, rkyv::Serialize, rkyv::Deserialize,rkyv::Portable,rkyv::bytecheck::CheckBytes,),bytecheck(crate = rkyv::bytecheck),rkyv(as = Self), repr(transparent))]
pub struct ClassicMania {}
#[derive(Copy, Eq, Clone, Debug, Default, PartialEq)]
#[cfg_attr(feature = "rkyv", derive(rkyv::Archive, rkyv::Serialize, rkyv::Deserialize,rkyv::Portable,rkyv::bytecheck::CheckBytes,),bytecheck(crate = rkyv::bytecheck),rkyv(as = Self), repr(transparent))]
pub struct InvertMania {}
#[derive(Copy, Eq, Clone, Debug, Default, PartialEq)]
#[cfg_attr(feature = "rkyv", derive(rkyv::Archive, rkyv::Serialize, rkyv::Deserialize,rkyv::Portable,rkyv::bytecheck::CheckBytes,),bytecheck(crate = rkyv::bytecheck),rkyv(as = Self), repr(transparent))]
pub struct ConstantSpeedMania {}
#[derive(Copy, Eq, Clone, Debug, Default, PartialEq)]
#[cfg_attr(feature = "rkyv", derive(rkyv::Archive, rkyv::Serialize, rkyv::Deserialize,rkyv::Portable,rkyv::bytecheck::CheckBytes,),bytecheck(crate = rkyv::bytecheck),rkyv(as = Self), repr(transparent))]
pub struct HoldOffMania {}
#[derive(Copy, Eq, Clone, Debug, Default, PartialEq)]
#[cfg_attr(feature = "rkyv", derive(rkyv::Archive, rkyv::Serialize, rkyv::Deserialize,rkyv::Portable,rkyv::bytecheck::CheckBytes,),bytecheck(crate = rkyv::bytecheck),rkyv(as = Self), repr(transparent))]
pub struct OneKeyMania {}
#[derive(Copy, Eq, Clone, Debug, Default, PartialEq)]
#[cfg_attr(feature = "rkyv", derive(rkyv::Archive, rkyv::Serialize, rkyv::Deserialize,rkyv::Portable,rkyv::bytecheck::CheckBytes,),bytecheck(crate = rkyv::bytecheck),rkyv(as = Self), repr(transparent))]
pub struct TwoKeysMania {}
#[derive(Copy, Eq, Clone, Debug, Default, PartialEq)]
#[cfg_attr(feature = "rkyv", derive(rkyv::Archive, rkyv::Serialize, rkyv::Deserialize,rkyv::Portable,rkyv::bytecheck::CheckBytes,),bytecheck(crate = rkyv::bytecheck),rkyv(as = Self), repr(transparent))]
pub struct ThreeKeysMania {}
#[derive(Copy, Eq, Clone, Debug, Default, PartialEq)]
#[cfg_attr(feature = "rkyv", derive(rkyv::Archive, rkyv::Serialize, rkyv::Deserialize,rkyv::Portable,rkyv::bytecheck::CheckBytes,),bytecheck(crate = rkyv::bytecheck),rkyv(as = Self), repr(transparent))]
pub struct FourKeysMania {}
#[derive(Copy, Eq, Clone, Debug, Default, PartialEq)]
#[cfg_attr(feature = "rkyv", derive(rkyv::Archive, rkyv::Serialize, rkyv::Deserialize,rkyv::Portable,rkyv::bytecheck::CheckBytes,),bytecheck(crate = rkyv::bytecheck),rkyv(as = Self), repr(transparent))]
pub struct FiveKeysMania {}
#[derive(Copy, Eq, Clone, Debug, Default, PartialEq)]
#[cfg_attr(feature = "rkyv", derive(rkyv::Archive, rkyv::Serialize, rkyv::Deserialize,rkyv::Portable,rkyv::bytecheck::CheckBytes,),bytecheck(crate = rkyv::bytecheck),rkyv(as = Self), repr(transparent))]
pub struct SixKeysMania {}
#[derive(Copy, Eq, Clone, Debug, Default, PartialEq)]
#[cfg_attr(feature = "rkyv", derive(rkyv::Archive, rkyv::Serialize, rkyv::Deserialize,rkyv::Portable,rkyv::bytecheck::CheckBytes,),bytecheck(crate = rkyv::bytecheck),rkyv(as = Self), repr(transparent))]
pub struct SevenKeysMania {}
#[derive(Copy, Eq, Clone, Debug, Default, PartialEq)]
#[cfg_attr(feature = "rkyv", derive(rkyv::Archive, rkyv::Serialize, rkyv::Deserialize,rkyv::Portable,rkyv::bytecheck::CheckBytes,),bytecheck(crate = rkyv::bytecheck),rkyv(as = Self), repr(transparent))]
pub struct EightKeysMania {}
#[derive(Copy, Eq, Clone, Debug, Default, PartialEq)]
#[cfg_attr(feature = "rkyv", derive(rkyv::Archive, rkyv::Serialize, rkyv::Deserialize,rkyv::Portable,rkyv::bytecheck::CheckBytes,),bytecheck(crate = rkyv::bytecheck),rkyv(as = Self), repr(transparent))]
pub struct NineKeysMania {}
#[derive(Copy, Eq, Clone, Debug, Default, PartialEq)]
#[cfg_attr(feature = "rkyv", derive(rkyv::Archive, rkyv::Serialize, rkyv::Deserialize,rkyv::Portable,rkyv::bytecheck::CheckBytes,),bytecheck(crate = rkyv::bytecheck),rkyv(as = Self), repr(transparent))]
pub struct TenKeysMania {}
#[derive(Copy, Eq, Clone, Debug, Default, PartialEq)]
#[cfg_attr(feature = "rkyv", derive(rkyv::Archive, rkyv::Serialize, rkyv::Deserialize,rkyv::Portable,rkyv::bytecheck::CheckBytes,),bytecheck(crate = rkyv::bytecheck),rkyv(as = Self), repr(transparent))]
pub struct AutoplayMania {}
#[derive(Copy, Eq, Clone, Debug, Default, PartialEq)]
#[cfg_attr(feature = "rkyv", derive(rkyv::Archive, rkyv::Serialize, rkyv::Deserialize,rkyv::Portable,rkyv::bytecheck::CheckBytes,),bytecheck(crate = rkyv::bytecheck),rkyv(as = Self), repr(transparent))]
pub struct CinemaMania {}
#[derive(Clone, Debug, Default, PartialEq)]
#[cfg_attr(
feature = "rkyv",
derive(rkyv::Archive, rkyv::Serialize, rkyv::Deserialize)
)]
pub struct WindUpMania {
pub initial_rate: Option<f64>,
pub final_rate: Option<f64>,
pub adjust_pitch: Option<bool>,
}
#[derive(Clone, Debug, Default, PartialEq)]
#[cfg_attr(
feature = "rkyv",
derive(rkyv::Archive, rkyv::Serialize, rkyv::Deserialize)
)]
pub struct WindDownMania {
pub initial_rate: Option<f64>,
pub final_rate: Option<f64>,
pub adjust_pitch: Option<bool>,
}
#[derive(Clone, Debug, Default, PartialEq)]
#[cfg_attr(
feature = "rkyv",
derive(rkyv::Archive, rkyv::Serialize, rkyv::Deserialize)
)]
pub struct MutedMania {
pub inverse_muting: Option<bool>,
pub enable_metronome: Option<bool>,
pub mute_combo_count: Option<f64>,
pub affects_hit_sounds: Option<bool>,
}
#[derive(Clone, Debug, Default, PartialEq)]
#[cfg_attr(
feature = "rkyv",
derive(rkyv::Archive, rkyv::Serialize, rkyv::Deserialize)
)]
pub struct AdaptiveSpeedMania {
pub initial_rate: Option<f64>,
pub adjust_pitch: Option<bool>,
}
#[derive(Copy, Eq, Clone, Debug, Default, PartialEq)]
#[cfg_attr(feature = "rkyv", derive(rkyv::Archive, rkyv::Serialize, rkyv::Deserialize,rkyv::Portable,rkyv::bytecheck::CheckBytes,),bytecheck(crate = rkyv::bytecheck),rkyv(as = Self), repr(transparent))]
pub struct ScoreV2Mania {}
#[derive(Copy, Eq, Clone, Debug, PartialEq, PartialOrd, Ord, Hash)]
#[cfg_attr(feature = "rkyv",derive(rkyv::Archive,rkyv::Serialize,rkyv::Deserialize,rkyv::Portable,rkyv::bytecheck::CheckBytes,),bytecheck(crate = rkyv::bytecheck),rkyv(as = Self),repr(transparent),)]
pub struct UnknownMod {
pub acronym: crate::Acronym,
}
}
pub use all_structs::{
AccuracyChallengeCatch, AccuracyChallengeMania, AccuracyChallengeOsu, AccuracyChallengeTaiko,
AdaptiveSpeedMania, AdaptiveSpeedOsu, AdaptiveSpeedTaiko, AlternateOsu, ApproachDifferentOsu,
AutopilotOsu, AutoplayCatch, AutoplayMania, AutoplayOsu, AutoplayTaiko, BarrelRollOsu,
BlindsOsu, BubblesOsu, CinemaCatch, CinemaMania, CinemaOsu, CinemaTaiko, ClassicCatch,
ClassicMania, ClassicOsu, ClassicTaiko, ConstantSpeedMania, ConstantSpeedTaiko, CoverMania,
DaycoreCatch, DaycoreMania, DaycoreOsu, DaycoreTaiko, DeflateOsu, DepthOsu,
DifficultyAdjustCatch, DifficultyAdjustMania, DifficultyAdjustOsu, DifficultyAdjustTaiko,
DoubleTimeCatch, DoubleTimeMania, DoubleTimeOsu, DoubleTimeTaiko, DualStagesMania, EasyCatch,
EasyMania, EasyOsu, EasyTaiko, EightKeysMania, FadeInMania, FiveKeysMania, FlashlightCatch,
FlashlightMania, FlashlightOsu, FlashlightTaiko, FloatingFruitsCatch, FourKeysMania,
FreezeFrameOsu, GrowOsu, HalfTimeCatch, HalfTimeMania, HalfTimeOsu, HalfTimeTaiko,
HardRockCatch, HardRockMania, HardRockOsu, HardRockTaiko, HiddenCatch, HiddenMania, HiddenOsu,
HiddenTaiko, HoldOffMania, InvertMania, MagnetisedOsu, MirrorCatch, MirrorMania, MirrorOsu,
MutedCatch, MutedMania, MutedOsu, MutedTaiko, NightcoreCatch, NightcoreMania, NightcoreOsu,
NightcoreTaiko, NineKeysMania, NoFailCatch, NoFailMania, NoFailOsu, NoFailTaiko,
NoReleaseMania, NoScopeCatch, NoScopeOsu, OneKeyMania, PerfectCatch, PerfectMania, PerfectOsu,
PerfectTaiko, RandomMania, RandomOsu, RandomTaiko, RelaxCatch, RelaxOsu, RelaxTaiko, RepelOsu,
ScoreV2Catch, ScoreV2Mania, ScoreV2Osu, ScoreV2Taiko, SevenKeysMania, SingleTapOsu,
SingleTapTaiko, SixKeysMania, SpinInOsu, SpunOutOsu, StrictTrackingOsu, SuddenDeathCatch,
SuddenDeathMania, SuddenDeathOsu, SuddenDeathTaiko, SwapTaiko, SynesthesiaOsu,
TargetPracticeOsu, TenKeysMania, ThreeKeysMania, TouchDeviceOsu, TraceableOsu, TransformOsu,
TwoKeysMania, UnknownMod, WiggleOsu, WindDownCatch, WindDownMania, WindDownOsu, WindDownTaiko,
WindUpCatch, WindUpMania, WindUpOsu, WindUpTaiko,
};
pub use gamemod::GameMod;
pub use intermode::GameModIntermode;
pub use kind::GameModKind;
#[cfg(feature = "rkyv")]
#[cfg_attr(all(docsrs, not(doctest)), doc(cfg(feature = "rkyv")))]
#[doc(hidden)]
pub mod rkyv {
pub use super::all_structs::{
AccuracyChallengeCatchResolver, AccuracyChallengeManiaResolver,
AccuracyChallengeOsuResolver, AccuracyChallengeTaikoResolver, AdaptiveSpeedManiaResolver,
AdaptiveSpeedOsuResolver, AdaptiveSpeedTaikoResolver, AlternateOsuResolver,
ApproachDifferentOsuResolver, ArchivedAccuracyChallengeCatch,
ArchivedAccuracyChallengeMania, ArchivedAccuracyChallengeOsu,
ArchivedAccuracyChallengeTaiko, ArchivedAdaptiveSpeedMania, ArchivedAdaptiveSpeedOsu,
ArchivedAdaptiveSpeedTaiko, ArchivedApproachDifferentOsu, ArchivedBarrelRollOsu,
ArchivedClassicOsu, ArchivedCoverMania, ArchivedDaycoreCatch, ArchivedDaycoreMania,
ArchivedDaycoreOsu, ArchivedDaycoreTaiko, ArchivedDeflateOsu, ArchivedDepthOsu,
ArchivedDifficultyAdjustCatch, ArchivedDifficultyAdjustMania, ArchivedDifficultyAdjustOsu,
ArchivedDifficultyAdjustTaiko, ArchivedDoubleTimeCatch, ArchivedDoubleTimeMania,
ArchivedDoubleTimeOsu, ArchivedDoubleTimeTaiko, ArchivedEasyCatch, ArchivedEasyMania,
ArchivedEasyOsu, ArchivedFlashlightCatch, ArchivedFlashlightMania, ArchivedFlashlightOsu,
ArchivedFlashlightTaiko, ArchivedGrowOsu, ArchivedHalfTimeCatch, ArchivedHalfTimeMania,
ArchivedHalfTimeOsu, ArchivedHalfTimeTaiko, ArchivedHiddenOsu, ArchivedMagnetisedOsu,
ArchivedMirrorOsu, ArchivedMutedCatch, ArchivedMutedMania, ArchivedMutedOsu,
ArchivedMutedTaiko, ArchivedNightcoreCatch, ArchivedNightcoreMania, ArchivedNightcoreOsu,
ArchivedNightcoreTaiko, ArchivedNoScopeCatch, ArchivedNoScopeOsu, ArchivedPerfectCatch,
ArchivedPerfectMania, ArchivedPerfectOsu, ArchivedPerfectTaiko, ArchivedRandomMania,
ArchivedRandomOsu, ArchivedRandomTaiko, ArchivedRepelOsu, ArchivedSuddenDeathCatch,
ArchivedSuddenDeathMania, ArchivedSuddenDeathOsu, ArchivedSuddenDeathTaiko,
ArchivedTargetPracticeOsu, ArchivedWiggleOsu, ArchivedWindDownCatch, ArchivedWindDownMania,
ArchivedWindDownOsu, ArchivedWindDownTaiko, ArchivedWindUpCatch, ArchivedWindUpMania,
ArchivedWindUpOsu, ArchivedWindUpTaiko, AutopilotOsuResolver, AutoplayCatchResolver,
AutoplayManiaResolver, AutoplayOsuResolver, AutoplayTaikoResolver, BarrelRollOsuResolver,
BlindsOsuResolver, BubblesOsuResolver, CinemaCatchResolver, CinemaManiaResolver,
CinemaOsuResolver, CinemaTaikoResolver, ClassicCatchResolver, ClassicManiaResolver,
ClassicOsuResolver, ClassicTaikoResolver, ConstantSpeedManiaResolver,
ConstantSpeedTaikoResolver, CoverManiaResolver, DaycoreCatchResolver, DaycoreManiaResolver,
DaycoreOsuResolver, DaycoreTaikoResolver, DeflateOsuResolver, DepthOsuResolver,
DifficultyAdjustCatchResolver, DifficultyAdjustManiaResolver, DifficultyAdjustOsuResolver,
DifficultyAdjustTaikoResolver, DoubleTimeCatchResolver, DoubleTimeManiaResolver,
DoubleTimeOsuResolver, DoubleTimeTaikoResolver, DualStagesManiaResolver, EasyCatchResolver,
EasyManiaResolver, EasyOsuResolver, EasyTaikoResolver, EightKeysManiaResolver,
FadeInManiaResolver, FiveKeysManiaResolver, FlashlightCatchResolver,
FlashlightManiaResolver, FlashlightOsuResolver, FlashlightTaikoResolver,
FloatingFruitsCatchResolver, FourKeysManiaResolver, FreezeFrameOsuResolver,
GrowOsuResolver, HalfTimeCatchResolver, HalfTimeManiaResolver, HalfTimeOsuResolver,
HalfTimeTaikoResolver, HardRockCatchResolver, HardRockManiaResolver, HardRockOsuResolver,
HardRockTaikoResolver, HiddenCatchResolver, HiddenManiaResolver, HiddenOsuResolver,
HiddenTaikoResolver, HoldOffManiaResolver, InvertManiaResolver, MagnetisedOsuResolver,
MirrorCatchResolver, MirrorManiaResolver, MirrorOsuResolver, MutedCatchResolver,
MutedManiaResolver, MutedOsuResolver, MutedTaikoResolver, NightcoreCatchResolver,
NightcoreManiaResolver, NightcoreOsuResolver, NightcoreTaikoResolver,
NineKeysManiaResolver, NoFailCatchResolver, NoFailManiaResolver, NoFailOsuResolver,
NoFailTaikoResolver, NoReleaseManiaResolver, NoScopeCatchResolver, NoScopeOsuResolver,
OneKeyManiaResolver, PerfectCatchResolver, PerfectManiaResolver, PerfectOsuResolver,
PerfectTaikoResolver, RandomManiaResolver, RandomOsuResolver, RandomTaikoResolver,
RelaxCatchResolver, RelaxOsuResolver, RelaxTaikoResolver, RepelOsuResolver,
ScoreV2CatchResolver, ScoreV2ManiaResolver, ScoreV2OsuResolver, ScoreV2TaikoResolver,
SevenKeysManiaResolver, SingleTapOsuResolver, SingleTapTaikoResolver, SixKeysManiaResolver,
SpinInOsuResolver, SpunOutOsuResolver, StrictTrackingOsuResolver, SuddenDeathCatchResolver,
SuddenDeathManiaResolver, SuddenDeathOsuResolver, SuddenDeathTaikoResolver,
SwapTaikoResolver, SynesthesiaOsuResolver, TargetPracticeOsuResolver, TenKeysManiaResolver,
ThreeKeysManiaResolver, TouchDeviceOsuResolver, TraceableOsuResolver, TransformOsuResolver,
TwoKeysManiaResolver, UnknownModResolver, WiggleOsuResolver, WindDownCatchResolver,
WindDownManiaResolver, WindDownOsuResolver, WindDownTaikoResolver, WindUpCatchResolver,
WindUpManiaResolver, WindUpOsuResolver, WindUpTaikoResolver,
};
pub use super::gamemod::{ArchivedGameMod, GameModResolver};
pub use super::intermode::GameModIntermodeResolver;
pub use super::kind::GameModKindResolver;
}
impl EasyOsu {
pub const fn acronym() -> Acronym {
unsafe { Acronym::from_str_unchecked("EZ") }
}
pub fn incompatible_mods() -> impl Iterator<Item = Acronym> {
unsafe {
[
Acronym::from_str_unchecked("HR"),
Acronym::from_str_unchecked("AC"),
Acronym::from_str_unchecked("DA"),
]
}
.into_iter()
}
pub const fn description() -> &'static str {
"Larger circles, more forgiving HP drain, less accuracy required, and three lives!"
}
pub const fn kind() -> GameModKind {
GameModKind::DifficultyReduction
}
pub const fn bits() -> u32 {
2
}
}
impl NoFailOsu {
pub const fn acronym() -> Acronym {
unsafe { Acronym::from_str_unchecked("NF") }
}
pub fn incompatible_mods() -> impl Iterator<Item = Acronym> {
unsafe {
[
Acronym::from_str_unchecked("SD"),
Acronym::from_str_unchecked("PF"),
Acronym::from_str_unchecked("AC"),
Acronym::from_str_unchecked("CN"),
]
}
.into_iter()
}
pub const fn description() -> &'static str {
"You can't fail, no matter what."
}
pub const fn kind() -> GameModKind {
GameModKind::DifficultyReduction
}
pub const fn bits() -> u32 {
1
}
}
impl HalfTimeOsu {
pub const fn acronym() -> Acronym {
unsafe { Acronym::from_str_unchecked("HT") }
}
pub fn incompatible_mods() -> impl Iterator<Item = Acronym> {
unsafe {
[
Acronym::from_str_unchecked("DC"),
Acronym::from_str_unchecked("DT"),
Acronym::from_str_unchecked("NC"),
Acronym::from_str_unchecked("WU"),
Acronym::from_str_unchecked("WD"),
Acronym::from_str_unchecked("AS"),
]
}
.into_iter()
}
pub const fn description() -> &'static str {
"Less zoom..."
}
pub const fn kind() -> GameModKind {
GameModKind::DifficultyReduction
}
pub const fn bits() -> u32 {
256
}
}
impl DaycoreOsu {
pub const fn acronym() -> Acronym {
unsafe { Acronym::from_str_unchecked("DC") }
}
pub fn incompatible_mods() -> impl Iterator<Item = Acronym> {
unsafe {
[
Acronym::from_str_unchecked("HT"),
Acronym::from_str_unchecked("DT"),
Acronym::from_str_unchecked("NC"),
Acronym::from_str_unchecked("WU"),
Acronym::from_str_unchecked("WD"),
Acronym::from_str_unchecked("AS"),
]
}
.into_iter()
}
pub const fn description() -> &'static str {
"Whoaaaaa..."
}
pub const fn kind() -> GameModKind {
GameModKind::DifficultyReduction
}
}
impl HardRockOsu {
pub const fn acronym() -> Acronym {
unsafe { Acronym::from_str_unchecked("HR") }
}
pub fn incompatible_mods() -> impl Iterator<Item = Acronym> {
unsafe {
[
Acronym::from_str_unchecked("EZ"),
Acronym::from_str_unchecked("DA"),
Acronym::from_str_unchecked("MR"),
]
}
.into_iter()
}
pub const fn description() -> &'static str {
"Everything just got a bit harder..."
}
pub const fn kind() -> GameModKind {
GameModKind::DifficultyIncrease
}
pub const fn bits() -> u32 {
16
}
}
impl SuddenDeathOsu {
pub const fn acronym() -> Acronym {
unsafe { Acronym::from_str_unchecked("SD") }
}
pub fn incompatible_mods() -> impl Iterator<Item = Acronym> {
unsafe {
[
Acronym::from_str_unchecked("NF"),
Acronym::from_str_unchecked("PF"),
Acronym::from_str_unchecked("TP"),
Acronym::from_str_unchecked("CN"),
]
}
.into_iter()
}
pub const fn description() -> &'static str {
"Miss and fail."
}
pub const fn kind() -> GameModKind {
GameModKind::DifficultyIncrease
}
pub const fn bits() -> u32 {
32
}
}
impl PerfectOsu {
pub const fn acronym() -> Acronym {
unsafe { Acronym::from_str_unchecked("PF") }
}
pub fn incompatible_mods() -> impl Iterator<Item = Acronym> {
unsafe {
[
Acronym::from_str_unchecked("NF"),
Acronym::from_str_unchecked("SD"),
Acronym::from_str_unchecked("AC"),
Acronym::from_str_unchecked("CN"),
]
}
.into_iter()
}
pub const fn description() -> &'static str {
"SS or quit."
}
pub const fn kind() -> GameModKind {
GameModKind::DifficultyIncrease
}
pub const fn bits() -> u32 {
16416
}
}
impl DoubleTimeOsu {
pub const fn acronym() -> Acronym {
unsafe { Acronym::from_str_unchecked("DT") }
}
pub fn incompatible_mods() -> impl Iterator<Item = Acronym> {
unsafe {
[
Acronym::from_str_unchecked("HT"),
Acronym::from_str_unchecked("DC"),
Acronym::from_str_unchecked("NC"),
Acronym::from_str_unchecked("WU"),
Acronym::from_str_unchecked("WD"),
Acronym::from_str_unchecked("AS"),
]
}
.into_iter()
}
pub const fn description() -> &'static str {
"Zoooooooooom..."
}
pub const fn kind() -> GameModKind {
GameModKind::DifficultyIncrease
}
pub const fn bits() -> u32 {
64
}
}
impl NightcoreOsu {
pub const fn acronym() -> Acronym {
unsafe { Acronym::from_str_unchecked("NC") }
}
pub fn incompatible_mods() -> impl Iterator<Item = Acronym> {
unsafe {
[
Acronym::from_str_unchecked("HT"),
Acronym::from_str_unchecked("DC"),
Acronym::from_str_unchecked("DT"),
Acronym::from_str_unchecked("WU"),
Acronym::from_str_unchecked("WD"),
Acronym::from_str_unchecked("AS"),
]
}
.into_iter()
}
pub const fn description() -> &'static str {
"Uguuuuuuuu..."
}
pub const fn kind() -> GameModKind {
GameModKind::DifficultyIncrease
}
pub const fn bits() -> u32 {
576
}
}
impl HiddenOsu {
pub const fn acronym() -> Acronym {
unsafe { Acronym::from_str_unchecked("HD") }
}
pub fn incompatible_mods() -> impl Iterator<Item = Acronym> {
unsafe {
[
Acronym::from_str_unchecked("SI"),
Acronym::from_str_unchecked("TC"),
Acronym::from_str_unchecked("AD"),
Acronym::from_str_unchecked("DP"),
]
}
.into_iter()
}
pub const fn description() -> &'static str {
"Play with no approach circles and fading circles/sliders."
}
pub const fn kind() -> GameModKind {
GameModKind::DifficultyIncrease
}
pub const fn bits() -> u32 {
8
}
}
impl FlashlightOsu {
pub const fn acronym() -> Acronym {
unsafe { Acronym::from_str_unchecked("FL") }
}
pub fn incompatible_mods() -> impl Iterator<Item = Acronym> {
unsafe { [Acronym::from_str_unchecked("BL")] }.into_iter()
}
pub const fn description() -> &'static str {
"Restricted view area."
}
pub const fn kind() -> GameModKind {
GameModKind::DifficultyIncrease
}
pub const fn bits() -> u32 {
1024
}
}
impl BlindsOsu {
pub const fn acronym() -> Acronym {
unsafe { Acronym::from_str_unchecked("BL") }
}
pub fn incompatible_mods() -> impl Iterator<Item = Acronym> {
unsafe { [Acronym::from_str_unchecked("FL")] }.into_iter()
}
pub const fn description() -> &'static str {
"Play with blinds on your screen."
}
pub const fn kind() -> GameModKind {
GameModKind::DifficultyIncrease
}
}
impl StrictTrackingOsu {
pub const fn acronym() -> Acronym {
unsafe { Acronym::from_str_unchecked("ST") }
}
pub fn incompatible_mods() -> impl Iterator<Item = Acronym> {
unsafe {
[
Acronym::from_str_unchecked("TP"),
Acronym::from_str_unchecked("CL"),
]
}
.into_iter()
}
pub const fn description() -> &'static str {
"Once you start a slider, follow precisely or get a miss."
}
pub const fn kind() -> GameModKind {
GameModKind::DifficultyIncrease
}
}
impl AccuracyChallengeOsu {
pub const fn acronym() -> Acronym {
unsafe { Acronym::from_str_unchecked("AC") }
}
pub fn incompatible_mods() -> impl Iterator<Item = Acronym> {
unsafe {
[
Acronym::from_str_unchecked("EZ"),
Acronym::from_str_unchecked("NF"),
Acronym::from_str_unchecked("PF"),
Acronym::from_str_unchecked("CN"),
]
}
.into_iter()
}
pub const fn description() -> &'static str {
"Fail if your accuracy drops too low!"
}
pub const fn kind() -> GameModKind {
GameModKind::DifficultyIncrease
}
}
impl TargetPracticeOsu {
pub const fn acronym() -> Acronym {
unsafe { Acronym::from_str_unchecked("TP") }
}
pub fn incompatible_mods() -> impl Iterator<Item = Acronym> {
unsafe {
[
Acronym::from_str_unchecked("SD"),
Acronym::from_str_unchecked("ST"),
Acronym::from_str_unchecked("RD"),
Acronym::from_str_unchecked("SO"),
Acronym::from_str_unchecked("TC"),
Acronym::from_str_unchecked("AD"),
Acronym::from_str_unchecked("DP"),
]
}
.into_iter()
}
pub const fn description() -> &'static str {
"Practice keeping up with the beat of the song."
}
pub const fn kind() -> GameModKind {
GameModKind::Conversion
}
pub const fn bits() -> u32 {
8388608
}
}
impl DifficultyAdjustOsu {
pub const fn acronym() -> Acronym {
unsafe { Acronym::from_str_unchecked("DA") }
}
pub fn incompatible_mods() -> impl Iterator<Item = Acronym> {
unsafe {
[
Acronym::from_str_unchecked("EZ"),
Acronym::from_str_unchecked("HR"),
]
}
.into_iter()
}
pub const fn description() -> &'static str {
"Override a beatmap's difficulty settings."
}
pub const fn kind() -> GameModKind {
GameModKind::Conversion
}
}
impl ClassicOsu {
pub const fn acronym() -> Acronym {
unsafe { Acronym::from_str_unchecked("CL") }
}
pub fn incompatible_mods() -> impl Iterator<Item = Acronym> {
unsafe { [Acronym::from_str_unchecked("ST")] }.into_iter()
}
pub const fn description() -> &'static str {
"Feeling nostalgic?"
}
pub const fn kind() -> GameModKind {
GameModKind::Conversion
}
}
impl RandomOsu {
pub const fn acronym() -> Acronym {
unsafe { Acronym::from_str_unchecked("RD") }
}
pub fn incompatible_mods() -> impl Iterator<Item = Acronym> {
unsafe { [Acronym::from_str_unchecked("TP")] }.into_iter()
}
pub const fn description() -> &'static str {
"It never gets boring!"
}
pub const fn kind() -> GameModKind {
GameModKind::Conversion
}
pub const fn bits() -> u32 {
2097152
}
}
impl MirrorOsu {
pub const fn acronym() -> Acronym {
unsafe { Acronym::from_str_unchecked("MR") }
}
pub fn incompatible_mods() -> impl Iterator<Item = Acronym> {
unsafe { [Acronym::from_str_unchecked("HR")] }.into_iter()
}
pub const fn description() -> &'static str {
"Flip objects on the chosen axes."
}
pub const fn kind() -> GameModKind {
GameModKind::Conversion
}
pub const fn bits() -> u32 {
1073741824
}
}
impl AlternateOsu {
pub const fn acronym() -> Acronym {
unsafe { Acronym::from_str_unchecked("AL") }
}
pub fn incompatible_mods() -> impl Iterator<Item = Acronym> {
unsafe {
[
Acronym::from_str_unchecked("SG"),
Acronym::from_str_unchecked("AT"),
Acronym::from_str_unchecked("CN"),
Acronym::from_str_unchecked("RX"),
]
}
.into_iter()
}
pub const fn description() -> &'static str {
"Don't use the same key twice in a row!"
}
pub const fn kind() -> GameModKind {
GameModKind::Conversion
}
}
impl SingleTapOsu {
pub const fn acronym() -> Acronym {
unsafe { Acronym::from_str_unchecked("SG") }
}
pub fn incompatible_mods() -> impl Iterator<Item = Acronym> {
unsafe {
[
Acronym::from_str_unchecked("AL"),
Acronym::from_str_unchecked("AT"),
Acronym::from_str_unchecked("CN"),
Acronym::from_str_unchecked("RX"),
]
}
.into_iter()
}
pub const fn description() -> &'static str {
"You must only use one key!"
}
pub const fn kind() -> GameModKind {
GameModKind::Conversion
}
}
impl AutoplayOsu {
pub const fn acronym() -> Acronym {
unsafe { Acronym::from_str_unchecked("AT") }
}
pub fn incompatible_mods() -> impl Iterator<Item = Acronym> {
unsafe {
[
Acronym::from_str_unchecked("AL"),
Acronym::from_str_unchecked("SG"),
Acronym::from_str_unchecked("CN"),
Acronym::from_str_unchecked("RX"),
Acronym::from_str_unchecked("AP"),
Acronym::from_str_unchecked("SO"),
Acronym::from_str_unchecked("MG"),
Acronym::from_str_unchecked("RP"),
Acronym::from_str_unchecked("AS"),
Acronym::from_str_unchecked("TD"),
]
}
.into_iter()
}
pub const fn description() -> &'static str {
"Watch a perfect automated play through the song."
}
pub const fn kind() -> GameModKind {
GameModKind::Automation
}
pub const fn bits() -> u32 {
2048
}
}
impl CinemaOsu {
pub const fn acronym() -> Acronym {
unsafe { Acronym::from_str_unchecked("CN") }
}
pub fn incompatible_mods() -> impl Iterator<Item = Acronym> {
unsafe {
[
Acronym::from_str_unchecked("NF"),
Acronym::from_str_unchecked("SD"),
Acronym::from_str_unchecked("PF"),
Acronym::from_str_unchecked("AC"),
Acronym::from_str_unchecked("AL"),
Acronym::from_str_unchecked("SG"),
Acronym::from_str_unchecked("AT"),
Acronym::from_str_unchecked("RX"),
Acronym::from_str_unchecked("AP"),
Acronym::from_str_unchecked("SO"),
Acronym::from_str_unchecked("MG"),
Acronym::from_str_unchecked("RP"),
Acronym::from_str_unchecked("AS"),
Acronym::from_str_unchecked("TD"),
]
}
.into_iter()
}
pub const fn description() -> &'static str {
"Watch the video without visual distractions."
}
pub const fn kind() -> GameModKind {
GameModKind::Automation
}
pub const fn bits() -> u32 {
4194304
}
}
impl RelaxOsu {
pub const fn acronym() -> Acronym {
unsafe { Acronym::from_str_unchecked("RX") }
}
pub fn incompatible_mods() -> impl Iterator<Item = Acronym> {
unsafe {
[
Acronym::from_str_unchecked("AL"),
Acronym::from_str_unchecked("SG"),
Acronym::from_str_unchecked("AT"),
Acronym::from_str_unchecked("CN"),
Acronym::from_str_unchecked("AP"),
Acronym::from_str_unchecked("MG"),
]
}
.into_iter()
}
pub const fn description() -> &'static str {
"You don't need to click. Give your clicking/tapping fingers a break from the heat of things."
}
pub const fn kind() -> GameModKind {
GameModKind::Automation
}
pub const fn bits() -> u32 {
128
}
}
impl AutopilotOsu {
pub const fn acronym() -> Acronym {
unsafe { Acronym::from_str_unchecked("AP") }
}
pub fn incompatible_mods() -> impl Iterator<Item = Acronym> {
unsafe {
[
Acronym::from_str_unchecked("AT"),
Acronym::from_str_unchecked("CN"),
Acronym::from_str_unchecked("RX"),
Acronym::from_str_unchecked("SO"),
Acronym::from_str_unchecked("MG"),
Acronym::from_str_unchecked("RP"),
Acronym::from_str_unchecked("TD"),
]
}
.into_iter()
}
pub const fn description() -> &'static str {
"Automatic cursor movement - just follow the rhythm."
}
pub const fn kind() -> GameModKind {
GameModKind::Automation
}
pub const fn bits() -> u32 {
8192
}
}
impl SpunOutOsu {
pub const fn acronym() -> Acronym {
unsafe { Acronym::from_str_unchecked("SO") }
}
pub fn incompatible_mods() -> impl Iterator<Item = Acronym> {
unsafe {
[
Acronym::from_str_unchecked("TP"),
Acronym::from_str_unchecked("AT"),
Acronym::from_str_unchecked("CN"),
Acronym::from_str_unchecked("AP"),
]
}
.into_iter()
}
pub const fn description() -> &'static str {
"Spinners will be automatically completed."
}
pub const fn kind() -> GameModKind {
GameModKind::Automation
}
pub const fn bits() -> u32 {
4096
}
}
impl TransformOsu {
pub const fn acronym() -> Acronym {
unsafe { Acronym::from_str_unchecked("TR") }
}
pub fn incompatible_mods() -> impl Iterator<Item = Acronym> {
unsafe {
[
Acronym::from_str_unchecked("WG"),
Acronym::from_str_unchecked("MG"),
Acronym::from_str_unchecked("RP"),
Acronym::from_str_unchecked("FR"),
Acronym::from_str_unchecked("DP"),
]
}
.into_iter()
}
pub const fn description() -> &'static str {
"Everything rotates. EVERYTHING."
}
pub const fn kind() -> GameModKind {
GameModKind::Fun
}
}
impl WiggleOsu {
pub const fn acronym() -> Acronym {
unsafe { Acronym::from_str_unchecked("WG") }
}
pub fn incompatible_mods() -> impl Iterator<Item = Acronym> {
unsafe {
[
Acronym::from_str_unchecked("TR"),
Acronym::from_str_unchecked("MG"),
Acronym::from_str_unchecked("RP"),
Acronym::from_str_unchecked("DP"),
]
}
.into_iter()
}
pub const fn description() -> &'static str {
"They just won't stay still..."
}
pub const fn kind() -> GameModKind {
GameModKind::Fun
}
}
impl SpinInOsu {
pub const fn acronym() -> Acronym {
unsafe { Acronym::from_str_unchecked("SI") }
}
pub fn incompatible_mods() -> impl Iterator<Item = Acronym> {
unsafe {
[
Acronym::from_str_unchecked("HD"),
Acronym::from_str_unchecked("GR"),
Acronym::from_str_unchecked("DF"),
Acronym::from_str_unchecked("TC"),
Acronym::from_str_unchecked("AD"),
Acronym::from_str_unchecked("DP"),
]
}
.into_iter()
}
pub const fn description() -> &'static str {
"Circles spin in. No approach circles."
}
pub const fn kind() -> GameModKind {
GameModKind::Fun
}
}
impl GrowOsu {
pub const fn acronym() -> Acronym {
unsafe { Acronym::from_str_unchecked("GR") }
}
pub fn incompatible_mods() -> impl Iterator<Item = Acronym> {
unsafe {
[
Acronym::from_str_unchecked("SI"),
Acronym::from_str_unchecked("DF"),
Acronym::from_str_unchecked("TC"),
Acronym::from_str_unchecked("AD"),
Acronym::from_str_unchecked("DP"),
]
}
.into_iter()
}
pub const fn description() -> &'static str {
"Hit them at the right size!"
}
pub const fn kind() -> GameModKind {
GameModKind::Fun
}
}
impl DeflateOsu {
pub const fn acronym() -> Acronym {
unsafe { Acronym::from_str_unchecked("DF") }
}
pub fn incompatible_mods() -> impl Iterator<Item = Acronym> {
unsafe {
[
Acronym::from_str_unchecked("SI"),
Acronym::from_str_unchecked("GR"),
Acronym::from_str_unchecked("TC"),
Acronym::from_str_unchecked("AD"),
Acronym::from_str_unchecked("DP"),
]
}
.into_iter()
}
pub const fn description() -> &'static str {
"Hit them at the right size!"
}
pub const fn kind() -> GameModKind {
GameModKind::Fun
}
}
impl WindUpOsu {
pub const fn acronym() -> Acronym {
unsafe { Acronym::from_str_unchecked("WU") }
}
pub fn incompatible_mods() -> impl Iterator<Item = Acronym> {
unsafe {
[
Acronym::from_str_unchecked("HT"),
Acronym::from_str_unchecked("DC"),
Acronym::from_str_unchecked("DT"),
Acronym::from_str_unchecked("NC"),
Acronym::from_str_unchecked("WD"),
Acronym::from_str_unchecked("AS"),
]
}
.into_iter()
}
pub const fn description() -> &'static str {
"Can you keep up?"
}
pub const fn kind() -> GameModKind {
GameModKind::Fun
}
}
impl WindDownOsu {
pub const fn acronym() -> Acronym {
unsafe { Acronym::from_str_unchecked("WD") }
}
pub fn incompatible_mods() -> impl Iterator<Item = Acronym> {
unsafe {
[
Acronym::from_str_unchecked("HT"),
Acronym::from_str_unchecked("DC"),
Acronym::from_str_unchecked("DT"),
Acronym::from_str_unchecked("NC"),
Acronym::from_str_unchecked("WU"),
Acronym::from_str_unchecked("AS"),
]
}
.into_iter()
}
pub const fn description() -> &'static str {
"Sloooow doooown..."
}
pub const fn kind() -> GameModKind {
GameModKind::Fun
}
}
impl TraceableOsu {
pub const fn acronym() -> Acronym {
unsafe { Acronym::from_str_unchecked("TC") }
}
pub fn incompatible_mods() -> impl Iterator<Item = Acronym> {
unsafe {
[
Acronym::from_str_unchecked("HD"),
Acronym::from_str_unchecked("TP"),
Acronym::from_str_unchecked("SI"),
Acronym::from_str_unchecked("GR"),
Acronym::from_str_unchecked("DF"),
Acronym::from_str_unchecked("DP"),
]
}
.into_iter()
}
pub const fn description() -> &'static str {
"Put your faith in the approach circles..."
}
pub const fn kind() -> GameModKind {
GameModKind::Fun
}
}
impl BarrelRollOsu {
pub const fn acronym() -> Acronym {
unsafe { Acronym::from_str_unchecked("BR") }
}
pub fn incompatible_mods() -> impl Iterator<Item = Acronym> {
unsafe { [Acronym::from_str_unchecked("BU")] }.into_iter()
}
pub const fn description() -> &'static str {
"The whole playfield is on a wheel!"
}
pub const fn kind() -> GameModKind {
GameModKind::Fun
}
}
impl ApproachDifferentOsu {
pub const fn acronym() -> Acronym {
unsafe { Acronym::from_str_unchecked("AD") }
}
pub fn incompatible_mods() -> impl Iterator<Item = Acronym> {
unsafe {
[
Acronym::from_str_unchecked("HD"),
Acronym::from_str_unchecked("TP"),
Acronym::from_str_unchecked("SI"),
Acronym::from_str_unchecked("GR"),
Acronym::from_str_unchecked("DF"),
Acronym::from_str_unchecked("FR"),
]
}
.into_iter()
}
pub const fn description() -> &'static str {
"Never trust the approach circles..."
}
pub const fn kind() -> GameModKind {
GameModKind::Fun
}
}
impl MutedOsu {
pub const fn acronym() -> Acronym {
unsafe { Acronym::from_str_unchecked("MU") }
}
pub fn incompatible_mods() -> impl Iterator<Item = Acronym> {
[].into_iter()
}
pub const fn description() -> &'static str {
"Can you still feel the rhythm without music?"
}
pub const fn kind() -> GameModKind {
GameModKind::Fun
}
}
impl NoScopeOsu {
pub const fn acronym() -> Acronym {
unsafe { Acronym::from_str_unchecked("NS") }
}
pub fn incompatible_mods() -> impl Iterator<Item = Acronym> {
[].into_iter()
}
pub const fn description() -> &'static str {
"Where's the cursor?"
}
pub const fn kind() -> GameModKind {
GameModKind::Fun
}
}
impl MagnetisedOsu {
pub const fn acronym() -> Acronym {
unsafe { Acronym::from_str_unchecked("MG") }
}
pub fn incompatible_mods() -> impl Iterator<Item = Acronym> {
unsafe {
[
Acronym::from_str_unchecked("AT"),
Acronym::from_str_unchecked("CN"),
Acronym::from_str_unchecked("RX"),
Acronym::from_str_unchecked("AP"),
Acronym::from_str_unchecked("TR"),
Acronym::from_str_unchecked("WG"),
Acronym::from_str_unchecked("RP"),
Acronym::from_str_unchecked("BU"),
Acronym::from_str_unchecked("DP"),
]
}
.into_iter()
}
pub const fn description() -> &'static str {
"No need to chase the circles – your cursor is a magnet!"
}
pub const fn kind() -> GameModKind {
GameModKind::Fun
}
}
impl RepelOsu {
pub const fn acronym() -> Acronym {
unsafe { Acronym::from_str_unchecked("RP") }
}
pub fn incompatible_mods() -> impl Iterator<Item = Acronym> {
unsafe {
[
Acronym::from_str_unchecked("AT"),
Acronym::from_str_unchecked("CN"),
Acronym::from_str_unchecked("AP"),
Acronym::from_str_unchecked("TR"),
Acronym::from_str_unchecked("WG"),
Acronym::from_str_unchecked("MG"),
Acronym::from_str_unchecked("BU"),
Acronym::from_str_unchecked("DP"),
]
}
.into_iter()
}
pub const fn description() -> &'static str {
"Hit objects run away!"
}
pub const fn kind() -> GameModKind {
GameModKind::Fun
}
}
impl AdaptiveSpeedOsu {
pub const fn acronym() -> Acronym {
unsafe { Acronym::from_str_unchecked("AS") }
}
pub fn incompatible_mods() -> impl Iterator<Item = Acronym> {
unsafe {
[
Acronym::from_str_unchecked("HT"),
Acronym::from_str_unchecked("DC"),
Acronym::from_str_unchecked("DT"),
Acronym::from_str_unchecked("NC"),
Acronym::from_str_unchecked("AT"),
Acronym::from_str_unchecked("CN"),
Acronym::from_str_unchecked("WU"),
Acronym::from_str_unchecked("WD"),
]
}
.into_iter()
}
pub const fn description() -> &'static str {
"Let track speed adapt to you."
}
pub const fn kind() -> GameModKind {
GameModKind::Fun
}
}
impl FreezeFrameOsu {
pub const fn acronym() -> Acronym {
unsafe { Acronym::from_str_unchecked("FR") }
}
pub fn incompatible_mods() -> impl Iterator<Item = Acronym> {
unsafe {
[
Acronym::from_str_unchecked("TR"),
Acronym::from_str_unchecked("AD"),
Acronym::from_str_unchecked("DP"),
]
}
.into_iter()
}
pub const fn description() -> &'static str {
"Burn the notes into your memory."
}
pub const fn kind() -> GameModKind {
GameModKind::Fun
}
}
impl BubblesOsu {
pub const fn acronym() -> Acronym {
unsafe { Acronym::from_str_unchecked("BU") }
}
pub fn incompatible_mods() -> impl Iterator<Item = Acronym> {
unsafe {
[
Acronym::from_str_unchecked("BR"),
Acronym::from_str_unchecked("MG"),
Acronym::from_str_unchecked("RP"),
]
}
.into_iter()
}
pub const fn description() -> &'static str {
"Don't let their popping distract you!"
}
pub const fn kind() -> GameModKind {
GameModKind::Fun
}
}
impl SynesthesiaOsu {
pub const fn acronym() -> Acronym {
unsafe { Acronym::from_str_unchecked("SY") }
}
pub fn incompatible_mods() -> impl Iterator<Item = Acronym> {
[].into_iter()
}
pub const fn description() -> &'static str {
"Colours hit objects based on the rhythm."
}
pub const fn kind() -> GameModKind {
GameModKind::Fun
}
}
impl DepthOsu {
pub const fn acronym() -> Acronym {
unsafe { Acronym::from_str_unchecked("DP") }
}
pub fn incompatible_mods() -> impl Iterator<Item = Acronym> {
unsafe {
[
Acronym::from_str_unchecked("HD"),
Acronym::from_str_unchecked("TP"),
Acronym::from_str_unchecked("TR"),
Acronym::from_str_unchecked("WG"),
Acronym::from_str_unchecked("SI"),
Acronym::from_str_unchecked("GR"),
Acronym::from_str_unchecked("DF"),
Acronym::from_str_unchecked("TC"),
Acronym::from_str_unchecked("MG"),
Acronym::from_str_unchecked("RP"),
Acronym::from_str_unchecked("FR"),
]
}
.into_iter()
}
pub const fn description() -> &'static str {
"3D. Almost."
}
pub const fn kind() -> GameModKind {
GameModKind::Fun
}
}
impl TouchDeviceOsu {
pub const fn acronym() -> Acronym {
unsafe { Acronym::from_str_unchecked("TD") }
}
pub fn incompatible_mods() -> impl Iterator<Item = Acronym> {
unsafe {
[
Acronym::from_str_unchecked("AT"),
Acronym::from_str_unchecked("CN"),
Acronym::from_str_unchecked("AP"),
]
}
.into_iter()
}
pub const fn description() -> &'static str {
"Automatically applied to plays on devices with a touchscreen."
}
pub const fn kind() -> GameModKind {
GameModKind::System
}
pub const fn bits() -> u32 {
4
}
}
impl ScoreV2Osu {
pub const fn acronym() -> Acronym {
unsafe { Acronym::from_str_unchecked("SV2") }
}
pub fn incompatible_mods() -> impl Iterator<Item = Acronym> {
[].into_iter()
}
pub const fn description() -> &'static str {
"Score set on earlier osu! versions with the V2 scoring algorithm active."
}
pub const fn kind() -> GameModKind {
GameModKind::System
}
pub const fn bits() -> u32 {
536870912
}
}
impl EasyTaiko {
pub const fn acronym() -> Acronym {
unsafe { Acronym::from_str_unchecked("EZ") }
}
pub fn incompatible_mods() -> impl Iterator<Item = Acronym> {
unsafe {
[
Acronym::from_str_unchecked("HR"),
Acronym::from_str_unchecked("DA"),
]
}
.into_iter()
}
pub const fn description() -> &'static str {
"Beats move slower, and less accuracy required!"
}
pub const fn kind() -> GameModKind {
GameModKind::DifficultyReduction
}
pub const fn bits() -> u32 {
2
}
}
impl NoFailTaiko {
pub const fn acronym() -> Acronym {
unsafe { Acronym::from_str_unchecked("NF") }
}
pub fn incompatible_mods() -> impl Iterator<Item = Acronym> {
unsafe {
[
Acronym::from_str_unchecked("SD"),
Acronym::from_str_unchecked("PF"),
Acronym::from_str_unchecked("AC"),
Acronym::from_str_unchecked("CN"),
]
}
.into_iter()
}
pub const fn description() -> &'static str {
"You can't fail, no matter what."
}
pub const fn kind() -> GameModKind {
GameModKind::DifficultyReduction
}
pub const fn bits() -> u32 {
1
}
}
impl HalfTimeTaiko {
pub const fn acronym() -> Acronym {
unsafe { Acronym::from_str_unchecked("HT") }
}
pub fn incompatible_mods() -> impl Iterator<Item = Acronym> {
unsafe {
[
Acronym::from_str_unchecked("DC"),
Acronym::from_str_unchecked("DT"),
Acronym::from_str_unchecked("NC"),
Acronym::from_str_unchecked("WU"),
Acronym::from_str_unchecked("WD"),
Acronym::from_str_unchecked("AS"),
]
}
.into_iter()
}
pub const fn description() -> &'static str {
"Less zoom..."
}
pub const fn kind() -> GameModKind {
GameModKind::DifficultyReduction
}
pub const fn bits() -> u32 {
256
}
}
impl DaycoreTaiko {
pub const fn acronym() -> Acronym {
unsafe { Acronym::from_str_unchecked("DC") }
}
pub fn incompatible_mods() -> impl Iterator<Item = Acronym> {
unsafe {
[
Acronym::from_str_unchecked("HT"),
Acronym::from_str_unchecked("DT"),
Acronym::from_str_unchecked("NC"),
Acronym::from_str_unchecked("WU"),
Acronym::from_str_unchecked("WD"),
Acronym::from_str_unchecked("AS"),
]
}
.into_iter()
}
pub const fn description() -> &'static str {
"Whoaaaaa..."
}
pub const fn kind() -> GameModKind {
GameModKind::DifficultyReduction
}
}
impl HardRockTaiko {
pub const fn acronym() -> Acronym {
unsafe { Acronym::from_str_unchecked("HR") }
}
pub fn incompatible_mods() -> impl Iterator<Item = Acronym> {
unsafe {
[
Acronym::from_str_unchecked("EZ"),
Acronym::from_str_unchecked("DA"),
]
}
.into_iter()
}
pub const fn description() -> &'static str {
"Everything just got a bit harder..."
}
pub const fn kind() -> GameModKind {
GameModKind::DifficultyIncrease
}
pub const fn bits() -> u32 {
16
}
}
impl SuddenDeathTaiko {
pub const fn acronym() -> Acronym {
unsafe { Acronym::from_str_unchecked("SD") }
}
pub fn incompatible_mods() -> impl Iterator<Item = Acronym> {
unsafe {
[
Acronym::from_str_unchecked("NF"),
Acronym::from_str_unchecked("PF"),
Acronym::from_str_unchecked("CN"),
]
}
.into_iter()
}
pub const fn description() -> &'static str {
"Miss and fail."
}
pub const fn kind() -> GameModKind {
GameModKind::DifficultyIncrease
}
pub const fn bits() -> u32 {
32
}
}
impl PerfectTaiko {
pub const fn acronym() -> Acronym {
unsafe { Acronym::from_str_unchecked("PF") }
}
pub fn incompatible_mods() -> impl Iterator<Item = Acronym> {
unsafe {
[
Acronym::from_str_unchecked("NF"),
Acronym::from_str_unchecked("SD"),
Acronym::from_str_unchecked("AC"),
Acronym::from_str_unchecked("CN"),
]
}
.into_iter()
}
pub const fn description() -> &'static str {
"SS or quit."
}
pub const fn kind() -> GameModKind {
GameModKind::DifficultyIncrease
}
pub const fn bits() -> u32 {
16416
}
}
impl DoubleTimeTaiko {
pub const fn acronym() -> Acronym {
unsafe { Acronym::from_str_unchecked("DT") }
}
pub fn incompatible_mods() -> impl Iterator<Item = Acronym> {
unsafe {
[
Acronym::from_str_unchecked("HT"),
Acronym::from_str_unchecked("DC"),
Acronym::from_str_unchecked("NC"),
Acronym::from_str_unchecked("WU"),
Acronym::from_str_unchecked("WD"),
Acronym::from_str_unchecked("AS"),
]
}
.into_iter()
}
pub const fn description() -> &'static str {
"Zoooooooooom..."
}
pub const fn kind() -> GameModKind {
GameModKind::DifficultyIncrease
}
pub const fn bits() -> u32 {
64
}
}
impl NightcoreTaiko {
pub const fn acronym() -> Acronym {
unsafe { Acronym::from_str_unchecked("NC") }
}
pub fn incompatible_mods() -> impl Iterator<Item = Acronym> {
unsafe {
[
Acronym::from_str_unchecked("HT"),
Acronym::from_str_unchecked("DC"),
Acronym::from_str_unchecked("DT"),
Acronym::from_str_unchecked("WU"),
Acronym::from_str_unchecked("WD"),
Acronym::from_str_unchecked("AS"),
]
}
.into_iter()
}
pub const fn description() -> &'static str {
"Uguuuuuuuu..."
}
pub const fn kind() -> GameModKind {
GameModKind::DifficultyIncrease
}
pub const fn bits() -> u32 {
576
}
}
impl HiddenTaiko {
pub const fn acronym() -> Acronym {
unsafe { Acronym::from_str_unchecked("HD") }
}
pub fn incompatible_mods() -> impl Iterator<Item = Acronym> {
[].into_iter()
}
pub const fn description() -> &'static str {
"Beats fade out before you hit them!"
}
pub const fn kind() -> GameModKind {
GameModKind::DifficultyIncrease
}
pub const fn bits() -> u32 {
8
}
}
impl FlashlightTaiko {
pub const fn acronym() -> Acronym {
unsafe { Acronym::from_str_unchecked("FL") }
}
pub fn incompatible_mods() -> impl Iterator<Item = Acronym> {
[].into_iter()
}
pub const fn description() -> &'static str {
"Restricted view area."
}
pub const fn kind() -> GameModKind {
GameModKind::DifficultyIncrease
}
pub const fn bits() -> u32 {
1024
}
}
impl AccuracyChallengeTaiko {
pub const fn acronym() -> Acronym {
unsafe { Acronym::from_str_unchecked("AC") }
}
pub fn incompatible_mods() -> impl Iterator<Item = Acronym> {
unsafe {
[
Acronym::from_str_unchecked("NF"),
Acronym::from_str_unchecked("PF"),
Acronym::from_str_unchecked("CN"),
]
}
.into_iter()
}
pub const fn description() -> &'static str {
"Fail if your accuracy drops too low!"
}
pub const fn kind() -> GameModKind {
GameModKind::DifficultyIncrease
}
}
impl RandomTaiko {
pub const fn acronym() -> Acronym {
unsafe { Acronym::from_str_unchecked("RD") }
}
pub fn incompatible_mods() -> impl Iterator<Item = Acronym> {
unsafe { [Acronym::from_str_unchecked("SW")] }.into_iter()
}
pub const fn description() -> &'static str {
"Shuffle around the colours!"
}
pub const fn kind() -> GameModKind {
GameModKind::Conversion
}
pub const fn bits() -> u32 {
2097152
}
}
impl DifficultyAdjustTaiko {
pub const fn acronym() -> Acronym {
unsafe { Acronym::from_str_unchecked("DA") }
}
pub fn incompatible_mods() -> impl Iterator<Item = Acronym> {
unsafe {
[
Acronym::from_str_unchecked("EZ"),
Acronym::from_str_unchecked("HR"),
]
}
.into_iter()
}
pub const fn description() -> &'static str {
"Override a beatmap's difficulty settings."
}
pub const fn kind() -> GameModKind {
GameModKind::Conversion
}
}
impl ClassicTaiko {
pub const fn acronym() -> Acronym {
unsafe { Acronym::from_str_unchecked("CL") }
}
pub fn incompatible_mods() -> impl Iterator<Item = Acronym> {
[].into_iter()
}
pub const fn description() -> &'static str {
"Feeling nostalgic?"
}
pub const fn kind() -> GameModKind {
GameModKind::Conversion
}
}
impl SwapTaiko {
pub const fn acronym() -> Acronym {
unsafe { Acronym::from_str_unchecked("SW") }
}
pub fn incompatible_mods() -> impl Iterator<Item = Acronym> {
unsafe { [Acronym::from_str_unchecked("RD")] }.into_iter()
}
pub const fn description() -> &'static str {
"Dons become kats, kats become dons"
}
pub const fn kind() -> GameModKind {
GameModKind::Conversion
}
}
impl SingleTapTaiko {
pub const fn acronym() -> Acronym {
unsafe { Acronym::from_str_unchecked("SG") }
}
pub fn incompatible_mods() -> impl Iterator<Item = Acronym> {
unsafe {
[
Acronym::from_str_unchecked("AT"),
Acronym::from_str_unchecked("CN"),
Acronym::from_str_unchecked("RX"),
]
}
.into_iter()
}
pub const fn description() -> &'static str {
"One key for dons, one key for kats."
}
pub const fn kind() -> GameModKind {
GameModKind::Conversion
}
}
impl ConstantSpeedTaiko {
pub const fn acronym() -> Acronym {
unsafe { Acronym::from_str_unchecked("CS") }
}
pub fn incompatible_mods() -> impl Iterator<Item = Acronym> {
[].into_iter()
}
pub const fn description() -> &'static str {
"No more tricky speed changes!"
}
pub const fn kind() -> GameModKind {
GameModKind::Conversion
}
}
impl AutoplayTaiko {
pub const fn acronym() -> Acronym {
unsafe { Acronym::from_str_unchecked("AT") }
}
pub fn incompatible_mods() -> impl Iterator<Item = Acronym> {
unsafe {
[
Acronym::from_str_unchecked("SG"),
Acronym::from_str_unchecked("CN"),
Acronym::from_str_unchecked("RX"),
Acronym::from_str_unchecked("AS"),
]
}
.into_iter()
}
pub const fn description() -> &'static str {
"Watch a perfect automated play through the song."
}
pub const fn kind() -> GameModKind {
GameModKind::Automation
}
pub const fn bits() -> u32 {
2048
}
}
impl CinemaTaiko {
pub const fn acronym() -> Acronym {
unsafe { Acronym::from_str_unchecked("CN") }
}
pub fn incompatible_mods() -> impl Iterator<Item = Acronym> {
unsafe {
[
Acronym::from_str_unchecked("NF"),
Acronym::from_str_unchecked("SD"),
Acronym::from_str_unchecked("PF"),
Acronym::from_str_unchecked("AC"),
Acronym::from_str_unchecked("SG"),
Acronym::from_str_unchecked("AT"),
Acronym::from_str_unchecked("RX"),
Acronym::from_str_unchecked("AS"),
]
}
.into_iter()
}
pub const fn description() -> &'static str {
"Watch the video without visual distractions."
}
pub const fn kind() -> GameModKind {
GameModKind::Automation
}
pub const fn bits() -> u32 {
4194304
}
}
impl RelaxTaiko {
pub const fn acronym() -> Acronym {
unsafe { Acronym::from_str_unchecked("RX") }
}
pub fn incompatible_mods() -> impl Iterator<Item = Acronym> {
unsafe {
[
Acronym::from_str_unchecked("SG"),
Acronym::from_str_unchecked("AT"),
Acronym::from_str_unchecked("CN"),
]
}
.into_iter()
}
pub const fn description() -> &'static str {
"No need to remember which key is correct anymore!"
}
pub const fn kind() -> GameModKind {
GameModKind::Automation
}
pub const fn bits() -> u32 {
128
}
}
impl WindUpTaiko {
pub const fn acronym() -> Acronym {
unsafe { Acronym::from_str_unchecked("WU") }
}
pub fn incompatible_mods() -> impl Iterator<Item = Acronym> {
unsafe {
[
Acronym::from_str_unchecked("HT"),
Acronym::from_str_unchecked("DC"),
Acronym::from_str_unchecked("DT"),
Acronym::from_str_unchecked("NC"),
Acronym::from_str_unchecked("WD"),
Acronym::from_str_unchecked("AS"),
]
}
.into_iter()
}
pub const fn description() -> &'static str {
"Can you keep up?"
}
pub const fn kind() -> GameModKind {
GameModKind::Fun
}
}
impl WindDownTaiko {
pub const fn acronym() -> Acronym {
unsafe { Acronym::from_str_unchecked("WD") }
}
pub fn incompatible_mods() -> impl Iterator<Item = Acronym> {
unsafe {
[
Acronym::from_str_unchecked("HT"),
Acronym::from_str_unchecked("DC"),
Acronym::from_str_unchecked("DT"),
Acronym::from_str_unchecked("NC"),
Acronym::from_str_unchecked("WU"),
Acronym::from_str_unchecked("AS"),
]
}
.into_iter()
}
pub const fn description() -> &'static str {
"Sloooow doooown..."
}
pub const fn kind() -> GameModKind {
GameModKind::Fun
}
}
impl MutedTaiko {
pub const fn acronym() -> Acronym {
unsafe { Acronym::from_str_unchecked("MU") }
}
pub fn incompatible_mods() -> impl Iterator<Item = Acronym> {
[].into_iter()
}
pub const fn description() -> &'static str {
"Can you still feel the rhythm without music?"
}
pub const fn kind() -> GameModKind {
GameModKind::Fun
}
}
impl AdaptiveSpeedTaiko {
pub const fn acronym() -> Acronym {
unsafe { Acronym::from_str_unchecked("AS") }
}
pub fn incompatible_mods() -> impl Iterator<Item = Acronym> {
unsafe {
[
Acronym::from_str_unchecked("HT"),
Acronym::from_str_unchecked("DC"),
Acronym::from_str_unchecked("DT"),
Acronym::from_str_unchecked("NC"),
Acronym::from_str_unchecked("AT"),
Acronym::from_str_unchecked("CN"),
Acronym::from_str_unchecked("WU"),
Acronym::from_str_unchecked("WD"),
]
}
.into_iter()
}
pub const fn description() -> &'static str {
"Let track speed adapt to you."
}
pub const fn kind() -> GameModKind {
GameModKind::Fun
}
}
impl ScoreV2Taiko {
pub const fn acronym() -> Acronym {
unsafe { Acronym::from_str_unchecked("SV2") }
}
pub fn incompatible_mods() -> impl Iterator<Item = Acronym> {
[].into_iter()
}
pub const fn description() -> &'static str {
"Score set on earlier osu! versions with the V2 scoring algorithm active."
}
pub const fn kind() -> GameModKind {
GameModKind::System
}
pub const fn bits() -> u32 {
536870912
}
}
impl EasyCatch {
pub const fn acronym() -> Acronym {
unsafe { Acronym::from_str_unchecked("EZ") }
}
pub fn incompatible_mods() -> impl Iterator<Item = Acronym> {
unsafe {
[
Acronym::from_str_unchecked("HR"),
Acronym::from_str_unchecked("AC"),
Acronym::from_str_unchecked("DA"),
]
}
.into_iter()
}
pub const fn description() -> &'static str {
"Larger fruits, more forgiving HP drain, less accuracy required, and three lives!"
}
pub const fn kind() -> GameModKind {
GameModKind::DifficultyReduction
}
pub const fn bits() -> u32 {
2
}
}
impl NoFailCatch {
pub const fn acronym() -> Acronym {
unsafe { Acronym::from_str_unchecked("NF") }
}
pub fn incompatible_mods() -> impl Iterator<Item = Acronym> {
unsafe {
[
Acronym::from_str_unchecked("SD"),
Acronym::from_str_unchecked("PF"),
Acronym::from_str_unchecked("AC"),
Acronym::from_str_unchecked("CN"),
]
}
.into_iter()
}
pub const fn description() -> &'static str {
"You can't fail, no matter what."
}
pub const fn kind() -> GameModKind {
GameModKind::DifficultyReduction
}
pub const fn bits() -> u32 {
1
}
}
impl HalfTimeCatch {
pub const fn acronym() -> Acronym {
unsafe { Acronym::from_str_unchecked("HT") }
}
pub fn incompatible_mods() -> impl Iterator<Item = Acronym> {
unsafe {
[
Acronym::from_str_unchecked("DC"),
Acronym::from_str_unchecked("DT"),
Acronym::from_str_unchecked("NC"),
Acronym::from_str_unchecked("WU"),
Acronym::from_str_unchecked("WD"),
]
}
.into_iter()
}
pub const fn description() -> &'static str {
"Less zoom..."
}
pub const fn kind() -> GameModKind {
GameModKind::DifficultyReduction
}
pub const fn bits() -> u32 {
256
}
}
impl DaycoreCatch {
pub const fn acronym() -> Acronym {
unsafe { Acronym::from_str_unchecked("DC") }
}
pub fn incompatible_mods() -> impl Iterator<Item = Acronym> {
unsafe {
[
Acronym::from_str_unchecked("HT"),
Acronym::from_str_unchecked("DT"),
Acronym::from_str_unchecked("NC"),
Acronym::from_str_unchecked("WU"),
Acronym::from_str_unchecked("WD"),
]
}
.into_iter()
}
pub const fn description() -> &'static str {
"Whoaaaaa..."
}
pub const fn kind() -> GameModKind {
GameModKind::DifficultyReduction
}
}
impl HardRockCatch {
pub const fn acronym() -> Acronym {
unsafe { Acronym::from_str_unchecked("HR") }
}
pub fn incompatible_mods() -> impl Iterator<Item = Acronym> {
unsafe {
[
Acronym::from_str_unchecked("EZ"),
Acronym::from_str_unchecked("DA"),
]
}
.into_iter()
}
pub const fn description() -> &'static str {
"Everything just got a bit harder..."
}
pub const fn kind() -> GameModKind {
GameModKind::DifficultyIncrease
}
pub const fn bits() -> u32 {
16
}
}
impl SuddenDeathCatch {
pub const fn acronym() -> Acronym {
unsafe { Acronym::from_str_unchecked("SD") }
}
pub fn incompatible_mods() -> impl Iterator<Item = Acronym> {
unsafe {
[
Acronym::from_str_unchecked("NF"),
Acronym::from_str_unchecked("PF"),
Acronym::from_str_unchecked("CN"),
]
}
.into_iter()
}
pub const fn description() -> &'static str {
"Miss and fail."
}
pub const fn kind() -> GameModKind {
GameModKind::DifficultyIncrease
}
pub const fn bits() -> u32 {
32
}
}
impl PerfectCatch {
pub const fn acronym() -> Acronym {
unsafe { Acronym::from_str_unchecked("PF") }
}
pub fn incompatible_mods() -> impl Iterator<Item = Acronym> {
unsafe {
[
Acronym::from_str_unchecked("NF"),
Acronym::from_str_unchecked("SD"),
Acronym::from_str_unchecked("AC"),
Acronym::from_str_unchecked("CN"),
]
}
.into_iter()
}
pub const fn description() -> &'static str {
"SS or quit."
}
pub const fn kind() -> GameModKind {
GameModKind::DifficultyIncrease
}
pub const fn bits() -> u32 {
16416
}
}
impl DoubleTimeCatch {
pub const fn acronym() -> Acronym {
unsafe { Acronym::from_str_unchecked("DT") }
}
pub fn incompatible_mods() -> impl Iterator<Item = Acronym> {
unsafe {
[
Acronym::from_str_unchecked("HT"),
Acronym::from_str_unchecked("DC"),
Acronym::from_str_unchecked("NC"),
Acronym::from_str_unchecked("WU"),
Acronym::from_str_unchecked("WD"),
]
}
.into_iter()
}
pub const fn description() -> &'static str {
"Zoooooooooom..."
}
pub const fn kind() -> GameModKind {
GameModKind::DifficultyIncrease
}
pub const fn bits() -> u32 {
64
}
}
impl NightcoreCatch {
pub const fn acronym() -> Acronym {
unsafe { Acronym::from_str_unchecked("NC") }
}
pub fn incompatible_mods() -> impl Iterator<Item = Acronym> {
unsafe {
[
Acronym::from_str_unchecked("HT"),
Acronym::from_str_unchecked("DC"),
Acronym::from_str_unchecked("DT"),
Acronym::from_str_unchecked("WU"),
Acronym::from_str_unchecked("WD"),
]
}
.into_iter()
}
pub const fn description() -> &'static str {
"Uguuuuuuuu..."
}
pub const fn kind() -> GameModKind {
GameModKind::DifficultyIncrease
}
pub const fn bits() -> u32 {
576
}
}
impl HiddenCatch {
pub const fn acronym() -> Acronym {
unsafe { Acronym::from_str_unchecked("HD") }
}
pub fn incompatible_mods() -> impl Iterator<Item = Acronym> {
[].into_iter()
}
pub const fn description() -> &'static str {
"Play with fading fruits."
}
pub const fn kind() -> GameModKind {
GameModKind::DifficultyIncrease
}
pub const fn bits() -> u32 {
8
}
}
impl FlashlightCatch {
pub const fn acronym() -> Acronym {
unsafe { Acronym::from_str_unchecked("FL") }
}
pub fn incompatible_mods() -> impl Iterator<Item = Acronym> {
[].into_iter()
}
pub const fn description() -> &'static str {
"Restricted view area."
}
pub const fn kind() -> GameModKind {
GameModKind::DifficultyIncrease
}
pub const fn bits() -> u32 {
1024
}
}
impl AccuracyChallengeCatch {
pub const fn acronym() -> Acronym {
unsafe { Acronym::from_str_unchecked("AC") }
}
pub fn incompatible_mods() -> impl Iterator<Item = Acronym> {
unsafe {
[
Acronym::from_str_unchecked("EZ"),
Acronym::from_str_unchecked("NF"),
Acronym::from_str_unchecked("PF"),
Acronym::from_str_unchecked("CN"),
]
}
.into_iter()
}
pub const fn description() -> &'static str {
"Fail if your accuracy drops too low!"
}
pub const fn kind() -> GameModKind {
GameModKind::DifficultyIncrease
}
}
impl DifficultyAdjustCatch {
pub const fn acronym() -> Acronym {
unsafe { Acronym::from_str_unchecked("DA") }
}
pub fn incompatible_mods() -> impl Iterator<Item = Acronym> {
unsafe {
[
Acronym::from_str_unchecked("EZ"),
Acronym::from_str_unchecked("HR"),
]
}
.into_iter()
}
pub const fn description() -> &'static str {
"Override a beatmap's difficulty settings."
}
pub const fn kind() -> GameModKind {
GameModKind::Conversion
}
}
impl ClassicCatch {
pub const fn acronym() -> Acronym {
unsafe { Acronym::from_str_unchecked("CL") }
}
pub fn incompatible_mods() -> impl Iterator<Item = Acronym> {
[].into_iter()
}
pub const fn description() -> &'static str {
"Feeling nostalgic?"
}
pub const fn kind() -> GameModKind {
GameModKind::Conversion
}
}
impl MirrorCatch {
pub const fn acronym() -> Acronym {
unsafe { Acronym::from_str_unchecked("MR") }
}
pub fn incompatible_mods() -> impl Iterator<Item = Acronym> {
[].into_iter()
}
pub const fn description() -> &'static str {
"Fruits are flipped horizontally."
}
pub const fn kind() -> GameModKind {
GameModKind::Conversion
}
pub const fn bits() -> u32 {
1073741824
}
}
impl AutoplayCatch {
pub const fn acronym() -> Acronym {
unsafe { Acronym::from_str_unchecked("AT") }
}
pub fn incompatible_mods() -> impl Iterator<Item = Acronym> {
unsafe {
[
Acronym::from_str_unchecked("CN"),
Acronym::from_str_unchecked("RX"),
]
}
.into_iter()
}
pub const fn description() -> &'static str {
"Watch a perfect automated play through the song."
}
pub const fn kind() -> GameModKind {
GameModKind::Automation
}
pub const fn bits() -> u32 {
2048
}
}
impl CinemaCatch {
pub const fn acronym() -> Acronym {
unsafe { Acronym::from_str_unchecked("CN") }
}
pub fn incompatible_mods() -> impl Iterator<Item = Acronym> {
unsafe {
[
Acronym::from_str_unchecked("NF"),
Acronym::from_str_unchecked("SD"),
Acronym::from_str_unchecked("PF"),
Acronym::from_str_unchecked("AC"),
Acronym::from_str_unchecked("AT"),
Acronym::from_str_unchecked("RX"),
]
}
.into_iter()
}
pub const fn description() -> &'static str {
"Watch the video without visual distractions."
}
pub const fn kind() -> GameModKind {
GameModKind::Automation
}
pub const fn bits() -> u32 {
4194304
}
}
impl RelaxCatch {
pub const fn acronym() -> Acronym {
unsafe { Acronym::from_str_unchecked("RX") }
}
pub fn incompatible_mods() -> impl Iterator<Item = Acronym> {
unsafe {
[
Acronym::from_str_unchecked("AT"),
Acronym::from_str_unchecked("CN"),
]
}
.into_iter()
}
pub const fn description() -> &'static str {
"Use the mouse to control the catcher."
}
pub const fn kind() -> GameModKind {
GameModKind::Automation
}
pub const fn bits() -> u32 {
128
}
}
impl WindUpCatch {
pub const fn acronym() -> Acronym {
unsafe { Acronym::from_str_unchecked("WU") }
}
pub fn incompatible_mods() -> impl Iterator<Item = Acronym> {
unsafe {
[
Acronym::from_str_unchecked("HT"),
Acronym::from_str_unchecked("DC"),
Acronym::from_str_unchecked("DT"),
Acronym::from_str_unchecked("NC"),
Acronym::from_str_unchecked("WD"),
]
}
.into_iter()
}
pub const fn description() -> &'static str {
"Can you keep up?"
}
pub const fn kind() -> GameModKind {
GameModKind::Fun
}
}
impl WindDownCatch {
pub const fn acronym() -> Acronym {
unsafe { Acronym::from_str_unchecked("WD") }
}
pub fn incompatible_mods() -> impl Iterator<Item = Acronym> {
unsafe {
[
Acronym::from_str_unchecked("HT"),
Acronym::from_str_unchecked("DC"),
Acronym::from_str_unchecked("DT"),
Acronym::from_str_unchecked("NC"),
Acronym::from_str_unchecked("WU"),
]
}
.into_iter()
}
pub const fn description() -> &'static str {
"Sloooow doooown..."
}
pub const fn kind() -> GameModKind {
GameModKind::Fun
}
}
impl FloatingFruitsCatch {
pub const fn acronym() -> Acronym {
unsafe { Acronym::from_str_unchecked("FF") }
}
pub fn incompatible_mods() -> impl Iterator<Item = Acronym> {
[].into_iter()
}
pub const fn description() -> &'static str {
"The fruits are... floating?"
}
pub const fn kind() -> GameModKind {
GameModKind::Fun
}
}
impl MutedCatch {
pub const fn acronym() -> Acronym {
unsafe { Acronym::from_str_unchecked("MU") }
}
pub fn incompatible_mods() -> impl Iterator<Item = Acronym> {
[].into_iter()
}
pub const fn description() -> &'static str {
"Can you still feel the rhythm without music?"
}
pub const fn kind() -> GameModKind {
GameModKind::Fun
}
}
impl NoScopeCatch {
pub const fn acronym() -> Acronym {
unsafe { Acronym::from_str_unchecked("NS") }
}
pub fn incompatible_mods() -> impl Iterator<Item = Acronym> {
[].into_iter()
}
pub const fn description() -> &'static str {
"Where's the catcher?"
}
pub const fn kind() -> GameModKind {
GameModKind::Fun
}
}
impl ScoreV2Catch {
pub const fn acronym() -> Acronym {
unsafe { Acronym::from_str_unchecked("SV2") }
}
pub fn incompatible_mods() -> impl Iterator<Item = Acronym> {
[].into_iter()
}
pub const fn description() -> &'static str {
"Score set on earlier osu! versions with the V2 scoring algorithm active."
}
pub const fn kind() -> GameModKind {
GameModKind::System
}
pub const fn bits() -> u32 {
536870912
}
}
impl EasyMania {
pub const fn acronym() -> Acronym {
unsafe { Acronym::from_str_unchecked("EZ") }
}
pub fn incompatible_mods() -> impl Iterator<Item = Acronym> {
unsafe {
[
Acronym::from_str_unchecked("HR"),
Acronym::from_str_unchecked("AC"),
Acronym::from_str_unchecked("DA"),
]
}
.into_iter()
}
pub const fn description() -> &'static str {
"More forgiving HP drain, less accuracy required, and three lives!"
}
pub const fn kind() -> GameModKind {
GameModKind::DifficultyReduction
}
pub const fn bits() -> u32 {
2
}
}
impl NoFailMania {
pub const fn acronym() -> Acronym {
unsafe { Acronym::from_str_unchecked("NF") }
}
pub fn incompatible_mods() -> impl Iterator<Item = Acronym> {
unsafe {
[
Acronym::from_str_unchecked("SD"),
Acronym::from_str_unchecked("PF"),
Acronym::from_str_unchecked("AC"),
Acronym::from_str_unchecked("CN"),
]
}
.into_iter()
}
pub const fn description() -> &'static str {
"You can't fail, no matter what."
}
pub const fn kind() -> GameModKind {
GameModKind::DifficultyReduction
}
pub const fn bits() -> u32 {
1
}
}
impl HalfTimeMania {
pub const fn acronym() -> Acronym {
unsafe { Acronym::from_str_unchecked("HT") }
}
pub fn incompatible_mods() -> impl Iterator<Item = Acronym> {
unsafe {
[
Acronym::from_str_unchecked("DC"),
Acronym::from_str_unchecked("DT"),
Acronym::from_str_unchecked("NC"),
Acronym::from_str_unchecked("WU"),
Acronym::from_str_unchecked("WD"),
Acronym::from_str_unchecked("AS"),
]
}
.into_iter()
}
pub const fn description() -> &'static str {
"Less zoom..."
}
pub const fn kind() -> GameModKind {
GameModKind::DifficultyReduction
}
pub const fn bits() -> u32 {
256
}
}
impl DaycoreMania {
pub const fn acronym() -> Acronym {
unsafe { Acronym::from_str_unchecked("DC") }
}
pub fn incompatible_mods() -> impl Iterator<Item = Acronym> {
unsafe {
[
Acronym::from_str_unchecked("HT"),
Acronym::from_str_unchecked("DT"),
Acronym::from_str_unchecked("NC"),
Acronym::from_str_unchecked("WU"),
Acronym::from_str_unchecked("WD"),
Acronym::from_str_unchecked("AS"),
]
}
.into_iter()
}
pub const fn description() -> &'static str {
"Whoaaaaa..."
}
pub const fn kind() -> GameModKind {
GameModKind::DifficultyReduction
}
}
impl NoReleaseMania {
pub const fn acronym() -> Acronym {
unsafe { Acronym::from_str_unchecked("NR") }
}
pub fn incompatible_mods() -> impl Iterator<Item = Acronym> {
unsafe { [Acronym::from_str_unchecked("HO")] }.into_iter()
}
pub const fn description() -> &'static str {
"No more timing the end of hold notes."
}
pub const fn kind() -> GameModKind {
GameModKind::DifficultyReduction
}
}
impl HardRockMania {
pub const fn acronym() -> Acronym {
unsafe { Acronym::from_str_unchecked("HR") }
}
pub fn incompatible_mods() -> impl Iterator<Item = Acronym> {
unsafe {
[
Acronym::from_str_unchecked("EZ"),
Acronym::from_str_unchecked("DA"),
]
}
.into_iter()
}
pub const fn description() -> &'static str {
"Everything just got a bit harder..."
}
pub const fn kind() -> GameModKind {
GameModKind::DifficultyIncrease
}
pub const fn bits() -> u32 {
16
}
}
impl SuddenDeathMania {
pub const fn acronym() -> Acronym {
unsafe { Acronym::from_str_unchecked("SD") }
}
pub fn incompatible_mods() -> impl Iterator<Item = Acronym> {
unsafe {
[
Acronym::from_str_unchecked("NF"),
Acronym::from_str_unchecked("PF"),
Acronym::from_str_unchecked("CN"),
]
}
.into_iter()
}
pub const fn description() -> &'static str {
"Miss and fail."
}
pub const fn kind() -> GameModKind {
GameModKind::DifficultyIncrease
}
pub const fn bits() -> u32 {
32
}
}
impl PerfectMania {
pub const fn acronym() -> Acronym {
unsafe { Acronym::from_str_unchecked("PF") }
}
pub fn incompatible_mods() -> impl Iterator<Item = Acronym> {
unsafe {
[
Acronym::from_str_unchecked("NF"),
Acronym::from_str_unchecked("SD"),
Acronym::from_str_unchecked("AC"),
Acronym::from_str_unchecked("CN"),
]
}
.into_iter()
}
pub const fn description() -> &'static str {
"SS or quit."
}
pub const fn kind() -> GameModKind {
GameModKind::DifficultyIncrease
}
pub const fn bits() -> u32 {
16416
}
}
impl DoubleTimeMania {
pub const fn acronym() -> Acronym {
unsafe { Acronym::from_str_unchecked("DT") }
}
pub fn incompatible_mods() -> impl Iterator<Item = Acronym> {
unsafe {
[
Acronym::from_str_unchecked("HT"),
Acronym::from_str_unchecked("DC"),
Acronym::from_str_unchecked("NC"),
Acronym::from_str_unchecked("WU"),
Acronym::from_str_unchecked("WD"),
Acronym::from_str_unchecked("AS"),
]
}
.into_iter()
}
pub const fn description() -> &'static str {
"Zoooooooooom..."
}
pub const fn kind() -> GameModKind {
GameModKind::DifficultyIncrease
}
pub const fn bits() -> u32 {
64
}
}
impl NightcoreMania {
pub const fn acronym() -> Acronym {
unsafe { Acronym::from_str_unchecked("NC") }
}
pub fn incompatible_mods() -> impl Iterator<Item = Acronym> {
unsafe {
[
Acronym::from_str_unchecked("HT"),
Acronym::from_str_unchecked("DC"),
Acronym::from_str_unchecked("DT"),
Acronym::from_str_unchecked("WU"),
Acronym::from_str_unchecked("WD"),
Acronym::from_str_unchecked("AS"),
]
}
.into_iter()
}
pub const fn description() -> &'static str {
"Uguuuuuuuu..."
}
pub const fn kind() -> GameModKind {
GameModKind::DifficultyIncrease
}
pub const fn bits() -> u32 {
576
}
}
impl FadeInMania {
pub const fn acronym() -> Acronym {
unsafe { Acronym::from_str_unchecked("FI") }
}
pub fn incompatible_mods() -> impl Iterator<Item = Acronym> {
unsafe {
[
Acronym::from_str_unchecked("HD"),
Acronym::from_str_unchecked("CO"),
Acronym::from_str_unchecked("FL"),
]
}
.into_iter()
}
pub const fn description() -> &'static str {
"Keys appear out of nowhere!"
}
pub const fn kind() -> GameModKind {
GameModKind::DifficultyIncrease
}
pub const fn bits() -> u32 {
1048576
}
}
impl HiddenMania {
pub const fn acronym() -> Acronym {
unsafe { Acronym::from_str_unchecked("HD") }
}
pub fn incompatible_mods() -> impl Iterator<Item = Acronym> {
unsafe {
[
Acronym::from_str_unchecked("FI"),
Acronym::from_str_unchecked("CO"),
Acronym::from_str_unchecked("FL"),
]
}
.into_iter()
}
pub const fn description() -> &'static str {
"Keys fade out before you hit them!"
}
pub const fn kind() -> GameModKind {
GameModKind::DifficultyIncrease
}
pub const fn bits() -> u32 {
8
}
}
impl CoverMania {
pub const fn acronym() -> Acronym {
unsafe { Acronym::from_str_unchecked("CO") }
}
pub fn incompatible_mods() -> impl Iterator<Item = Acronym> {
unsafe {
[
Acronym::from_str_unchecked("FI"),
Acronym::from_str_unchecked("HD"),
Acronym::from_str_unchecked("FL"),
]
}
.into_iter()
}
pub const fn description() -> &'static str {
"Decrease the playfield's viewing area."
}
pub const fn kind() -> GameModKind {
GameModKind::DifficultyIncrease
}
}
impl FlashlightMania {
pub const fn acronym() -> Acronym {
unsafe { Acronym::from_str_unchecked("FL") }
}
pub fn incompatible_mods() -> impl Iterator<Item = Acronym> {
unsafe {
[
Acronym::from_str_unchecked("FI"),
Acronym::from_str_unchecked("HD"),
Acronym::from_str_unchecked("CO"),
]
}
.into_iter()
}
pub const fn description() -> &'static str {
"Restricted view area."
}
pub const fn kind() -> GameModKind {
GameModKind::DifficultyIncrease
}
pub const fn bits() -> u32 {
1024
}
}
impl AccuracyChallengeMania {
pub const fn acronym() -> Acronym {
unsafe { Acronym::from_str_unchecked("AC") }
}
pub fn incompatible_mods() -> impl Iterator<Item = Acronym> {
unsafe {
[
Acronym::from_str_unchecked("EZ"),
Acronym::from_str_unchecked("NF"),
Acronym::from_str_unchecked("PF"),
Acronym::from_str_unchecked("CN"),
]
}
.into_iter()
}
pub const fn description() -> &'static str {
"Fail if your accuracy drops too low!"
}
pub const fn kind() -> GameModKind {
GameModKind::DifficultyIncrease
}
}
impl RandomMania {
pub const fn acronym() -> Acronym {
unsafe { Acronym::from_str_unchecked("RD") }
}
pub fn incompatible_mods() -> impl Iterator<Item = Acronym> {
[].into_iter()
}
pub const fn description() -> &'static str {
"Shuffle around the keys!"
}
pub const fn kind() -> GameModKind {
GameModKind::Conversion
}
pub const fn bits() -> u32 {
2097152
}
}
impl DualStagesMania {
pub const fn acronym() -> Acronym {
unsafe { Acronym::from_str_unchecked("DS") }
}
pub fn incompatible_mods() -> impl Iterator<Item = Acronym> {
[].into_iter()
}
pub const fn description() -> &'static str {
"Double the stages, double the fun!"
}
pub const fn kind() -> GameModKind {
GameModKind::Conversion
}
pub const fn bits() -> u32 {
33554432
}
}
impl MirrorMania {
pub const fn acronym() -> Acronym {
unsafe { Acronym::from_str_unchecked("MR") }
}
pub fn incompatible_mods() -> impl Iterator<Item = Acronym> {
[].into_iter()
}
pub const fn description() -> &'static str {
"Notes are flipped horizontally."
}
pub const fn kind() -> GameModKind {
GameModKind::Conversion
}
pub const fn bits() -> u32 {
1073741824
}
}
impl DifficultyAdjustMania {
pub const fn acronym() -> Acronym {
unsafe { Acronym::from_str_unchecked("DA") }
}
pub fn incompatible_mods() -> impl Iterator<Item = Acronym> {
unsafe {
[
Acronym::from_str_unchecked("EZ"),
Acronym::from_str_unchecked("HR"),
]
}
.into_iter()
}
pub const fn description() -> &'static str {
"Override a beatmap's difficulty settings."
}
pub const fn kind() -> GameModKind {
GameModKind::Conversion
}
}
impl ClassicMania {
pub const fn acronym() -> Acronym {
unsafe { Acronym::from_str_unchecked("CL") }
}
pub fn incompatible_mods() -> impl Iterator<Item = Acronym> {
[].into_iter()
}
pub const fn description() -> &'static str {
"Feeling nostalgic?"
}
pub const fn kind() -> GameModKind {
GameModKind::Conversion
}
}
impl InvertMania {
pub const fn acronym() -> Acronym {
unsafe { Acronym::from_str_unchecked("IN") }
}
pub fn incompatible_mods() -> impl Iterator<Item = Acronym> {
unsafe { [Acronym::from_str_unchecked("HO")] }.into_iter()
}
pub const fn description() -> &'static str {
"Hold the keys. To the beat."
}
pub const fn kind() -> GameModKind {
GameModKind::Conversion
}
}
impl ConstantSpeedMania {
pub const fn acronym() -> Acronym {
unsafe { Acronym::from_str_unchecked("CS") }
}
pub fn incompatible_mods() -> impl Iterator<Item = Acronym> {
[].into_iter()
}
pub const fn description() -> &'static str {
"No more tricky speed changes!"
}
pub const fn kind() -> GameModKind {
GameModKind::Conversion
}
}
impl HoldOffMania {
pub const fn acronym() -> Acronym {
unsafe { Acronym::from_str_unchecked("HO") }
}
pub fn incompatible_mods() -> impl Iterator<Item = Acronym> {
unsafe {
[
Acronym::from_str_unchecked("NR"),
Acronym::from_str_unchecked("IN"),
]
}
.into_iter()
}
pub const fn description() -> &'static str {
"Replaces all hold notes with normal notes."
}
pub const fn kind() -> GameModKind {
GameModKind::Conversion
}
}
impl OneKeyMania {
pub const fn acronym() -> Acronym {
unsafe { Acronym::from_str_unchecked("1K") }
}
pub fn incompatible_mods() -> impl Iterator<Item = Acronym> {
unsafe {
[
Acronym::from_str_unchecked("2K"),
Acronym::from_str_unchecked("3K"),
Acronym::from_str_unchecked("4K"),
Acronym::from_str_unchecked("5K"),
Acronym::from_str_unchecked("6K"),
Acronym::from_str_unchecked("7K"),
Acronym::from_str_unchecked("8K"),
Acronym::from_str_unchecked("9K"),
Acronym::from_str_unchecked("10K"),
]
}
.into_iter()
}
pub const fn description() -> &'static str {
"Play with one key."
}
pub const fn kind() -> GameModKind {
GameModKind::Conversion
}
pub const fn bits() -> u32 {
67108864
}
}
impl TwoKeysMania {
pub const fn acronym() -> Acronym {
unsafe { Acronym::from_str_unchecked("2K") }
}
pub fn incompatible_mods() -> impl Iterator<Item = Acronym> {
unsafe {
[
Acronym::from_str_unchecked("1K"),
Acronym::from_str_unchecked("3K"),
Acronym::from_str_unchecked("4K"),
Acronym::from_str_unchecked("5K"),
Acronym::from_str_unchecked("6K"),
Acronym::from_str_unchecked("7K"),
Acronym::from_str_unchecked("8K"),
Acronym::from_str_unchecked("9K"),
Acronym::from_str_unchecked("10K"),
]
}
.into_iter()
}
pub const fn description() -> &'static str {
"Play with two keys."
}
pub const fn kind() -> GameModKind {
GameModKind::Conversion
}
pub const fn bits() -> u32 {
268435456
}
}
impl ThreeKeysMania {
pub const fn acronym() -> Acronym {
unsafe { Acronym::from_str_unchecked("3K") }
}
pub fn incompatible_mods() -> impl Iterator<Item = Acronym> {
unsafe {
[
Acronym::from_str_unchecked("1K"),
Acronym::from_str_unchecked("2K"),
Acronym::from_str_unchecked("4K"),
Acronym::from_str_unchecked("5K"),
Acronym::from_str_unchecked("6K"),
Acronym::from_str_unchecked("7K"),
Acronym::from_str_unchecked("8K"),
Acronym::from_str_unchecked("9K"),
Acronym::from_str_unchecked("10K"),
]
}
.into_iter()
}
pub const fn description() -> &'static str {
"Play with three keys."
}
pub const fn kind() -> GameModKind {
GameModKind::Conversion
}
pub const fn bits() -> u32 {
134217728
}
}
impl FourKeysMania {
pub const fn acronym() -> Acronym {
unsafe { Acronym::from_str_unchecked("4K") }
}
pub fn incompatible_mods() -> impl Iterator<Item = Acronym> {
unsafe {
[
Acronym::from_str_unchecked("1K"),
Acronym::from_str_unchecked("2K"),
Acronym::from_str_unchecked("3K"),
Acronym::from_str_unchecked("5K"),
Acronym::from_str_unchecked("6K"),
Acronym::from_str_unchecked("7K"),
Acronym::from_str_unchecked("8K"),
Acronym::from_str_unchecked("9K"),
Acronym::from_str_unchecked("10K"),
]
}
.into_iter()
}
pub const fn description() -> &'static str {
"Play with four keys."
}
pub const fn kind() -> GameModKind {
GameModKind::Conversion
}
pub const fn bits() -> u32 {
32768
}
}
impl FiveKeysMania {
pub const fn acronym() -> Acronym {
unsafe { Acronym::from_str_unchecked("5K") }
}
pub fn incompatible_mods() -> impl Iterator<Item = Acronym> {
unsafe {
[
Acronym::from_str_unchecked("1K"),
Acronym::from_str_unchecked("2K"),
Acronym::from_str_unchecked("3K"),
Acronym::from_str_unchecked("4K"),
Acronym::from_str_unchecked("6K"),
Acronym::from_str_unchecked("7K"),
Acronym::from_str_unchecked("8K"),
Acronym::from_str_unchecked("9K"),
Acronym::from_str_unchecked("10K"),
]
}
.into_iter()
}
pub const fn description() -> &'static str {
"Play with five keys."
}
pub const fn kind() -> GameModKind {
GameModKind::Conversion
}
pub const fn bits() -> u32 {
65536
}
}
impl SixKeysMania {
pub const fn acronym() -> Acronym {
unsafe { Acronym::from_str_unchecked("6K") }
}
pub fn incompatible_mods() -> impl Iterator<Item = Acronym> {
unsafe {
[
Acronym::from_str_unchecked("1K"),
Acronym::from_str_unchecked("2K"),
Acronym::from_str_unchecked("3K"),
Acronym::from_str_unchecked("4K"),
Acronym::from_str_unchecked("5K"),
Acronym::from_str_unchecked("7K"),
Acronym::from_str_unchecked("8K"),
Acronym::from_str_unchecked("9K"),
Acronym::from_str_unchecked("10K"),
]
}
.into_iter()
}
pub const fn description() -> &'static str {
"Play with six keys."
}
pub const fn kind() -> GameModKind {
GameModKind::Conversion
}
pub const fn bits() -> u32 {
131072
}
}
impl SevenKeysMania {
pub const fn acronym() -> Acronym {
unsafe { Acronym::from_str_unchecked("7K") }
}
pub fn incompatible_mods() -> impl Iterator<Item = Acronym> {
unsafe {
[
Acronym::from_str_unchecked("1K"),
Acronym::from_str_unchecked("2K"),
Acronym::from_str_unchecked("3K"),
Acronym::from_str_unchecked("4K"),
Acronym::from_str_unchecked("5K"),
Acronym::from_str_unchecked("6K"),
Acronym::from_str_unchecked("8K"),
Acronym::from_str_unchecked("9K"),
Acronym::from_str_unchecked("10K"),
]
}
.into_iter()
}
pub const fn description() -> &'static str {
"Play with seven keys."
}
pub const fn kind() -> GameModKind {
GameModKind::Conversion
}
pub const fn bits() -> u32 {
262144
}
}
impl EightKeysMania {
pub const fn acronym() -> Acronym {
unsafe { Acronym::from_str_unchecked("8K") }
}
pub fn incompatible_mods() -> impl Iterator<Item = Acronym> {
unsafe {
[
Acronym::from_str_unchecked("1K"),
Acronym::from_str_unchecked("2K"),
Acronym::from_str_unchecked("3K"),
Acronym::from_str_unchecked("4K"),
Acronym::from_str_unchecked("5K"),
Acronym::from_str_unchecked("6K"),
Acronym::from_str_unchecked("7K"),
Acronym::from_str_unchecked("9K"),
Acronym::from_str_unchecked("10K"),
]
}
.into_iter()
}
pub const fn description() -> &'static str {
"Play with eight keys."
}
pub const fn kind() -> GameModKind {
GameModKind::Conversion
}
pub const fn bits() -> u32 {
524288
}
}
impl NineKeysMania {
pub const fn acronym() -> Acronym {
unsafe { Acronym::from_str_unchecked("9K") }
}
pub fn incompatible_mods() -> impl Iterator<Item = Acronym> {
unsafe {
[
Acronym::from_str_unchecked("1K"),
Acronym::from_str_unchecked("2K"),
Acronym::from_str_unchecked("3K"),
Acronym::from_str_unchecked("4K"),
Acronym::from_str_unchecked("5K"),
Acronym::from_str_unchecked("6K"),
Acronym::from_str_unchecked("7K"),
Acronym::from_str_unchecked("8K"),
Acronym::from_str_unchecked("10K"),
]
}
.into_iter()
}
pub const fn description() -> &'static str {
"Play with nine keys."
}
pub const fn kind() -> GameModKind {
GameModKind::Conversion
}
pub const fn bits() -> u32 {
16777216
}
}
impl TenKeysMania {
pub const fn acronym() -> Acronym {
unsafe { Acronym::from_str_unchecked("10K") }
}
pub fn incompatible_mods() -> impl Iterator<Item = Acronym> {
unsafe {
[
Acronym::from_str_unchecked("1K"),
Acronym::from_str_unchecked("2K"),
Acronym::from_str_unchecked("3K"),
Acronym::from_str_unchecked("4K"),
Acronym::from_str_unchecked("5K"),
Acronym::from_str_unchecked("6K"),
Acronym::from_str_unchecked("7K"),
Acronym::from_str_unchecked("8K"),
Acronym::from_str_unchecked("9K"),
]
}
.into_iter()
}
pub const fn description() -> &'static str {
"Play with ten keys."
}
pub const fn kind() -> GameModKind {
GameModKind::Conversion
}
}
impl AutoplayMania {
pub const fn acronym() -> Acronym {
unsafe { Acronym::from_str_unchecked("AT") }
}
pub fn incompatible_mods() -> impl Iterator<Item = Acronym> {
unsafe {
[
Acronym::from_str_unchecked("CN"),
Acronym::from_str_unchecked("AS"),
]
}
.into_iter()
}
pub const fn description() -> &'static str {
"Watch a perfect automated play through the song."
}
pub const fn kind() -> GameModKind {
GameModKind::Automation
}
pub const fn bits() -> u32 {
2048
}
}
impl CinemaMania {
pub const fn acronym() -> Acronym {
unsafe { Acronym::from_str_unchecked("CN") }
}
pub fn incompatible_mods() -> impl Iterator<Item = Acronym> {
unsafe {
[
Acronym::from_str_unchecked("NF"),
Acronym::from_str_unchecked("SD"),
Acronym::from_str_unchecked("PF"),
Acronym::from_str_unchecked("AC"),
Acronym::from_str_unchecked("AT"),
Acronym::from_str_unchecked("AS"),
]
}
.into_iter()
}
pub const fn description() -> &'static str {
"Watch the video without visual distractions."
}
pub const fn kind() -> GameModKind {
GameModKind::Automation
}
pub const fn bits() -> u32 {
4194304
}
}
impl WindUpMania {
pub const fn acronym() -> Acronym {
unsafe { Acronym::from_str_unchecked("WU") }
}
pub fn incompatible_mods() -> impl Iterator<Item = Acronym> {
unsafe {
[
Acronym::from_str_unchecked("HT"),
Acronym::from_str_unchecked("DC"),
Acronym::from_str_unchecked("DT"),
Acronym::from_str_unchecked("NC"),
Acronym::from_str_unchecked("WD"),
Acronym::from_str_unchecked("AS"),
]
}
.into_iter()
}
pub const fn description() -> &'static str {
"Can you keep up?"
}
pub const fn kind() -> GameModKind {
GameModKind::Fun
}
}
impl WindDownMania {
pub const fn acronym() -> Acronym {
unsafe { Acronym::from_str_unchecked("WD") }
}
pub fn incompatible_mods() -> impl Iterator<Item = Acronym> {
unsafe {
[
Acronym::from_str_unchecked("HT"),
Acronym::from_str_unchecked("DC"),
Acronym::from_str_unchecked("DT"),
Acronym::from_str_unchecked("NC"),
Acronym::from_str_unchecked("WU"),
Acronym::from_str_unchecked("AS"),
]
}
.into_iter()
}
pub const fn description() -> &'static str {
"Sloooow doooown..."
}
pub const fn kind() -> GameModKind {
GameModKind::Fun
}
}
impl MutedMania {
pub const fn acronym() -> Acronym {
unsafe { Acronym::from_str_unchecked("MU") }
}
pub fn incompatible_mods() -> impl Iterator<Item = Acronym> {
[].into_iter()
}
pub const fn description() -> &'static str {
"Can you still feel the rhythm without music?"
}
pub const fn kind() -> GameModKind {
GameModKind::Fun
}
}
impl AdaptiveSpeedMania {
pub const fn acronym() -> Acronym {
unsafe { Acronym::from_str_unchecked("AS") }
}
pub fn incompatible_mods() -> impl Iterator<Item = Acronym> {
unsafe {
[
Acronym::from_str_unchecked("HT"),
Acronym::from_str_unchecked("DC"),
Acronym::from_str_unchecked("DT"),
Acronym::from_str_unchecked("NC"),
Acronym::from_str_unchecked("AT"),
Acronym::from_str_unchecked("CN"),
Acronym::from_str_unchecked("WU"),
Acronym::from_str_unchecked("WD"),
]
}
.into_iter()
}
pub const fn description() -> &'static str {
"Let track speed adapt to you."
}
pub const fn kind() -> GameModKind {
GameModKind::Fun
}
}
impl ScoreV2Mania {
pub const fn acronym() -> Acronym {
unsafe { Acronym::from_str_unchecked("SV2") }
}
pub fn incompatible_mods() -> impl Iterator<Item = Acronym> {
[].into_iter()
}
pub const fn description() -> &'static str {
"Score set on earlier osu! versions with the V2 scoring algorithm active."
}
pub const fn kind() -> GameModKind {
GameModKind::System
}
pub const fn bits() -> u32 {
536870912
}
}
impl UnknownMod {
pub const UNKNOWN_ACRONYM: Acronym = unsafe { Acronym::from_str_unchecked("??") };
pub const fn acronym(self) -> Acronym {
self.acronym
}
pub const fn incompatible_mods() -> std::iter::Empty<Acronym> {
std::iter::empty()
}
pub const fn description() -> &'static str {
"Some unknown mod"
}
pub const fn kind() -> GameModKind {
GameModKind::System
}
}
impl Default for UnknownMod {
fn default() -> Self {
Self {
acronym: Self::UNKNOWN_ACRONYM,
}
}
}
mod kind {
#[derive(Copy, Clone, Debug, PartialEq, Eq, PartialOrd, Ord, Hash)]
#[cfg_attr(feature = "serde", derive(serde::Serialize))]
#[cfg_attr(feature = "rkyv",derive(rkyv::Archive,rkyv::Serialize,rkyv::Deserialize,rkyv::Portable,rkyv::bytecheck::CheckBytes,),bytecheck(crate = rkyv::bytecheck),rkyv(as = Self),repr(u8),)]
pub enum GameModKind {
DifficultyReduction,
DifficultyIncrease,
Conversion,
Automation,
Fun,
System,
}
}
pub(crate) mod intermode {
#[derive(Copy, Clone, Debug, PartialEq, Eq, Hash)]
#[cfg_attr(feature = "rkyv",derive(rkyv::Archive,rkyv::Serialize,rkyv::Deserialize,rkyv::Portable,rkyv::bytecheck::CheckBytes,),rkyv(as = Self),bytecheck(crate = rkyv::bytecheck),repr(u8),)]
#[non_exhaustive]
pub enum GameModIntermode {
AccuracyChallenge,
AdaptiveSpeed,
Alternate,
ApproachDifferent,
Autopilot,
Autoplay,
BarrelRoll,
Blinds,
Bubbles,
Cinema,
Classic,
ConstantSpeed,
Cover,
Daycore,
Deflate,
Depth,
DifficultyAdjust,
DoubleTime,
DualStages,
Easy,
EightKeys,
FadeIn,
FiveKeys,
Flashlight,
FloatingFruits,
FourKeys,
FreezeFrame,
Grow,
HalfTime,
HardRock,
Hidden,
HoldOff,
Invert,
Magnetised,
Mirror,
Muted,
Nightcore,
NineKeys,
NoFail,
NoRelease,
NoScope,
OneKey,
Perfect,
Random,
Relax,
Repel,
ScoreV2,
SevenKeys,
SingleTap,
SixKeys,
SpinIn,
SpunOut,
StrictTracking,
SuddenDeath,
Swap,
Synesthesia,
TargetPractice,
TenKeys,
ThreeKeys,
TouchDevice,
Traceable,
Transform,
TwoKeys,
Wiggle,
WindDown,
WindUp,
Unknown(super::UnknownMod),
}
}
impl GameModIntermode {
pub const fn acronym(&self) -> Acronym {
unsafe {
match self {
Self::AccuracyChallenge => Acronym::from_str_unchecked("AC"),
Self::AdaptiveSpeed => Acronym::from_str_unchecked("AS"),
Self::Alternate => Acronym::from_str_unchecked("AL"),
Self::ApproachDifferent => Acronym::from_str_unchecked("AD"),
Self::Autopilot => Acronym::from_str_unchecked("AP"),
Self::Autoplay => Acronym::from_str_unchecked("AT"),
Self::BarrelRoll => Acronym::from_str_unchecked("BR"),
Self::Blinds => Acronym::from_str_unchecked("BL"),
Self::Bubbles => Acronym::from_str_unchecked("BU"),
Self::Cinema => Acronym::from_str_unchecked("CN"),
Self::Classic => Acronym::from_str_unchecked("CL"),
Self::ConstantSpeed => Acronym::from_str_unchecked("CS"),
Self::Cover => Acronym::from_str_unchecked("CO"),
Self::Daycore => Acronym::from_str_unchecked("DC"),
Self::Deflate => Acronym::from_str_unchecked("DF"),
Self::Depth => Acronym::from_str_unchecked("DP"),
Self::DifficultyAdjust => Acronym::from_str_unchecked("DA"),
Self::DoubleTime => Acronym::from_str_unchecked("DT"),
Self::DualStages => Acronym::from_str_unchecked("DS"),
Self::Easy => Acronym::from_str_unchecked("EZ"),
Self::EightKeys => Acronym::from_str_unchecked("8K"),
Self::FadeIn => Acronym::from_str_unchecked("FI"),
Self::FiveKeys => Acronym::from_str_unchecked("5K"),
Self::Flashlight => Acronym::from_str_unchecked("FL"),
Self::FloatingFruits => Acronym::from_str_unchecked("FF"),
Self::FourKeys => Acronym::from_str_unchecked("4K"),
Self::FreezeFrame => Acronym::from_str_unchecked("FR"),
Self::Grow => Acronym::from_str_unchecked("GR"),
Self::HalfTime => Acronym::from_str_unchecked("HT"),
Self::HardRock => Acronym::from_str_unchecked("HR"),
Self::Hidden => Acronym::from_str_unchecked("HD"),
Self::HoldOff => Acronym::from_str_unchecked("HO"),
Self::Invert => Acronym::from_str_unchecked("IN"),
Self::Magnetised => Acronym::from_str_unchecked("MG"),
Self::Mirror => Acronym::from_str_unchecked("MR"),
Self::Muted => Acronym::from_str_unchecked("MU"),
Self::Nightcore => Acronym::from_str_unchecked("NC"),
Self::NineKeys => Acronym::from_str_unchecked("9K"),
Self::NoFail => Acronym::from_str_unchecked("NF"),
Self::NoRelease => Acronym::from_str_unchecked("NR"),
Self::NoScope => Acronym::from_str_unchecked("NS"),
Self::OneKey => Acronym::from_str_unchecked("1K"),
Self::Perfect => Acronym::from_str_unchecked("PF"),
Self::Random => Acronym::from_str_unchecked("RD"),
Self::Relax => Acronym::from_str_unchecked("RX"),
Self::Repel => Acronym::from_str_unchecked("RP"),
Self::ScoreV2 => Acronym::from_str_unchecked("SV2"),
Self::SevenKeys => Acronym::from_str_unchecked("7K"),
Self::SingleTap => Acronym::from_str_unchecked("SG"),
Self::SixKeys => Acronym::from_str_unchecked("6K"),
Self::SpinIn => Acronym::from_str_unchecked("SI"),
Self::SpunOut => Acronym::from_str_unchecked("SO"),
Self::StrictTracking => Acronym::from_str_unchecked("ST"),
Self::SuddenDeath => Acronym::from_str_unchecked("SD"),
Self::Swap => Acronym::from_str_unchecked("SW"),
Self::Synesthesia => Acronym::from_str_unchecked("SY"),
Self::TargetPractice => Acronym::from_str_unchecked("TP"),
Self::TenKeys => Acronym::from_str_unchecked("10K"),
Self::ThreeKeys => Acronym::from_str_unchecked("3K"),
Self::TouchDevice => Acronym::from_str_unchecked("TD"),
Self::Traceable => Acronym::from_str_unchecked("TC"),
Self::Transform => Acronym::from_str_unchecked("TR"),
Self::TwoKeys => Acronym::from_str_unchecked("2K"),
Self::Wiggle => Acronym::from_str_unchecked("WG"),
Self::WindDown => Acronym::from_str_unchecked("WD"),
Self::WindUp => Acronym::from_str_unchecked("WU"),
Self::Unknown(m) => m.acronym(),
}
}
}
pub const fn bits(self) -> Option<u32> {
match self {
Self::AccuracyChallenge => None,
Self::AdaptiveSpeed => None,
Self::Alternate => None,
Self::ApproachDifferent => None,
Self::Autopilot => Some(8192),
Self::Autoplay => Some(2048),
Self::BarrelRoll => None,
Self::Blinds => None,
Self::Bubbles => None,
Self::Cinema => Some(4194304),
Self::Classic => None,
Self::ConstantSpeed => None,
Self::Cover => None,
Self::Daycore => None,
Self::Deflate => None,
Self::Depth => None,
Self::DifficultyAdjust => None,
Self::DoubleTime => Some(64),
Self::DualStages => Some(33554432),
Self::Easy => Some(2),
Self::EightKeys => Some(524288),
Self::FadeIn => Some(1048576),
Self::FiveKeys => Some(65536),
Self::Flashlight => Some(1024),
Self::FloatingFruits => None,
Self::FourKeys => Some(32768),
Self::FreezeFrame => None,
Self::Grow => None,
Self::HalfTime => Some(256),
Self::HardRock => Some(16),
Self::Hidden => Some(8),
Self::HoldOff => None,
Self::Invert => None,
Self::Magnetised => None,
Self::Mirror => Some(1073741824),
Self::Muted => None,
Self::Nightcore => Some(576),
Self::NineKeys => Some(16777216),
Self::NoFail => Some(1),
Self::NoRelease => None,
Self::NoScope => None,
Self::OneKey => Some(67108864),
Self::Perfect => Some(16416),
Self::Random => Some(2097152),
Self::Relax => Some(128),
Self::Repel => None,
Self::ScoreV2 => Some(536870912),
Self::SevenKeys => Some(262144),
Self::SingleTap => None,
Self::SixKeys => Some(131072),
Self::SpinIn => None,
Self::SpunOut => Some(4096),
Self::StrictTracking => None,
Self::SuddenDeath => Some(32),
Self::Swap => None,
Self::Synesthesia => None,
Self::TargetPractice => Some(8388608),
Self::TenKeys => None,
Self::ThreeKeys => Some(134217728),
Self::TouchDevice => Some(4),
Self::Traceable => None,
Self::Transform => None,
Self::TwoKeys => Some(268435456),
Self::Wiggle => None,
Self::WindDown => None,
Self::WindUp => None,
Self::Unknown(_) => None,
}
}
pub const fn kind(&self) -> GameModKind {
match self {
Self::AccuracyChallenge => GameModKind::DifficultyIncrease,
Self::AdaptiveSpeed => GameModKind::Fun,
Self::Alternate => GameModKind::Conversion,
Self::ApproachDifferent => GameModKind::Fun,
Self::Autopilot => GameModKind::Automation,
Self::Autoplay => GameModKind::Automation,
Self::BarrelRoll => GameModKind::Fun,
Self::Blinds => GameModKind::DifficultyIncrease,
Self::Bubbles => GameModKind::Fun,
Self::Cinema => GameModKind::Automation,
Self::Classic => GameModKind::Conversion,
Self::ConstantSpeed => GameModKind::Conversion,
Self::Cover => GameModKind::DifficultyIncrease,
Self::Daycore => GameModKind::DifficultyReduction,
Self::Deflate => GameModKind::Fun,
Self::Depth => GameModKind::Fun,
Self::DifficultyAdjust => GameModKind::Conversion,
Self::DoubleTime => GameModKind::DifficultyIncrease,
Self::DualStages => GameModKind::Conversion,
Self::Easy => GameModKind::DifficultyReduction,
Self::EightKeys => GameModKind::Conversion,
Self::FadeIn => GameModKind::DifficultyIncrease,
Self::FiveKeys => GameModKind::Conversion,
Self::Flashlight => GameModKind::DifficultyIncrease,
Self::FloatingFruits => GameModKind::Fun,
Self::FourKeys => GameModKind::Conversion,
Self::FreezeFrame => GameModKind::Fun,
Self::Grow => GameModKind::Fun,
Self::HalfTime => GameModKind::DifficultyReduction,
Self::HardRock => GameModKind::DifficultyIncrease,
Self::Hidden => GameModKind::DifficultyIncrease,
Self::HoldOff => GameModKind::Conversion,
Self::Invert => GameModKind::Conversion,
Self::Magnetised => GameModKind::Fun,
Self::Mirror => GameModKind::Conversion,
Self::Muted => GameModKind::Fun,
Self::Nightcore => GameModKind::DifficultyIncrease,
Self::NineKeys => GameModKind::Conversion,
Self::NoFail => GameModKind::DifficultyReduction,
Self::NoRelease => GameModKind::DifficultyReduction,
Self::NoScope => GameModKind::Fun,
Self::OneKey => GameModKind::Conversion,
Self::Perfect => GameModKind::DifficultyIncrease,
Self::Random => GameModKind::Conversion,
Self::Relax => GameModKind::Automation,
Self::Repel => GameModKind::Fun,
Self::ScoreV2 => GameModKind::System,
Self::SevenKeys => GameModKind::Conversion,
Self::SingleTap => GameModKind::Conversion,
Self::SixKeys => GameModKind::Conversion,
Self::SpinIn => GameModKind::Fun,
Self::SpunOut => GameModKind::Automation,
Self::StrictTracking => GameModKind::DifficultyIncrease,
Self::SuddenDeath => GameModKind::DifficultyIncrease,
Self::Swap => GameModKind::Conversion,
Self::Synesthesia => GameModKind::Fun,
Self::TargetPractice => GameModKind::Conversion,
Self::TenKeys => GameModKind::Conversion,
Self::ThreeKeys => GameModKind::Conversion,
Self::TouchDevice => GameModKind::System,
Self::Traceable => GameModKind::Fun,
Self::Transform => GameModKind::Fun,
Self::TwoKeys => GameModKind::Conversion,
Self::Wiggle => GameModKind::Fun,
Self::WindDown => GameModKind::Fun,
Self::WindUp => GameModKind::Fun,
Self::Unknown(_) => GameModKind::System,
}
}
pub fn from_acronym(acronym: Acronym) -> Self {
match acronym.as_str() {
"AC" => Self::AccuracyChallenge,
"AS" => Self::AdaptiveSpeed,
"AL" => Self::Alternate,
"AD" => Self::ApproachDifferent,
"AP" => Self::Autopilot,
"AT" => Self::Autoplay,
"BR" => Self::BarrelRoll,
"BL" => Self::Blinds,
"BU" => Self::Bubbles,
"CN" => Self::Cinema,
"CL" => Self::Classic,
"CS" => Self::ConstantSpeed,
"CO" => Self::Cover,
"DC" => Self::Daycore,
"DF" => Self::Deflate,
"DP" => Self::Depth,
"DA" => Self::DifficultyAdjust,
"DT" => Self::DoubleTime,
"DS" => Self::DualStages,
"EZ" => Self::Easy,
"8K" => Self::EightKeys,
"FI" => Self::FadeIn,
"5K" => Self::FiveKeys,
"FL" => Self::Flashlight,
"FF" => Self::FloatingFruits,
"4K" => Self::FourKeys,
"FR" => Self::FreezeFrame,
"GR" => Self::Grow,
"HT" => Self::HalfTime,
"HR" => Self::HardRock,
"HD" => Self::Hidden,
"HO" => Self::HoldOff,
"IN" => Self::Invert,
"MG" => Self::Magnetised,
"MR" => Self::Mirror,
"MU" => Self::Muted,
"NC" => Self::Nightcore,
"9K" => Self::NineKeys,
"NF" => Self::NoFail,
"NR" => Self::NoRelease,
"NS" => Self::NoScope,
"1K" => Self::OneKey,
"PF" => Self::Perfect,
"RD" => Self::Random,
"RX" => Self::Relax,
"RP" => Self::Repel,
"SV2" => Self::ScoreV2,
"7K" => Self::SevenKeys,
"SG" => Self::SingleTap,
"6K" => Self::SixKeys,
"SI" => Self::SpinIn,
"SO" => Self::SpunOut,
"ST" => Self::StrictTracking,
"SD" => Self::SuddenDeath,
"SW" => Self::Swap,
"SY" => Self::Synesthesia,
"TP" => Self::TargetPractice,
"10K" => Self::TenKeys,
"3K" => Self::ThreeKeys,
"TD" => Self::TouchDevice,
"TC" => Self::Traceable,
"TR" => Self::Transform,
"2K" => Self::TwoKeys,
"WG" => Self::Wiggle,
"WD" => Self::WindDown,
"WU" => Self::WindUp,
_ => Self::Unknown(UnknownMod { acronym }),
}
}
pub const fn try_from_bits(bits: u32) -> Option<Self> {
match bits {
8192 => Some(Self::Autopilot),
2048 => Some(Self::Autoplay),
4194304 => Some(Self::Cinema),
64 => Some(Self::DoubleTime),
33554432 => Some(Self::DualStages),
2 => Some(Self::Easy),
524288 => Some(Self::EightKeys),
1048576 => Some(Self::FadeIn),
65536 => Some(Self::FiveKeys),
1024 => Some(Self::Flashlight),
32768 => Some(Self::FourKeys),
256 => Some(Self::HalfTime),
16 => Some(Self::HardRock),
8 => Some(Self::Hidden),
1073741824 => Some(Self::Mirror),
576 => Some(Self::Nightcore),
16777216 => Some(Self::NineKeys),
1 => Some(Self::NoFail),
67108864 => Some(Self::OneKey),
16416 => Some(Self::Perfect),
2097152 => Some(Self::Random),
128 => Some(Self::Relax),
536870912 => Some(Self::ScoreV2),
262144 => Some(Self::SevenKeys),
131072 => Some(Self::SixKeys),
4096 => Some(Self::SpunOut),
32 => Some(Self::SuddenDeath),
8388608 => Some(Self::TargetPractice),
134217728 => Some(Self::ThreeKeys),
4 => Some(Self::TouchDevice),
268435456 => Some(Self::TwoKeys),
_ => None,
}
}
}
impl PartialOrd for GameModIntermode {
fn partial_cmp(&self, other: &Self) -> Option<Ordering> {
Some(self.cmp(other))
}
}
impl Ord for GameModIntermode {
fn cmp(&self, other: &Self) -> Ordering {
match (self.bits(), other.bits()) {
(Some(self_bits), Some(other_bits)) => self_bits.cmp(&other_bits),
(Some(_), None) => Ordering::Less,
(None, Some(_)) => Ordering::Greater,
(None, None) => self.acronym().as_str().cmp(other.acronym().as_str()),
}
}
}
impl Display for GameModIntermode {
fn fmt(&self, f: &mut Formatter<'_>) -> FmtResult {
f.write_str(self.acronym().as_str())
}
}
impl From<&GameModIntermode> for GameModIntermode {
fn from(gamemod: &GameModIntermode) -> Self {
*gamemod
}
}
impl From<GameMod> for GameModIntermode {
fn from(gamemod: GameMod) -> Self {
gamemod.intermode()
}
}
#[derive(Copy, Clone, PartialEq, Eq)]
pub(crate) struct GameModOrder {
mode: GameMode,
index: Option<NonZeroU8>,
intermode: GameModIntermode,
}
impl From<&GameMod> for GameModOrder {
fn from(gamemod: &GameMod) -> Self {
const fn inner(gamemod: &GameMod) -> GameModOrder {
macro_rules! arm {
($mode:ident, $gamemod:ident, Some($discriminant:literal), $intermode:ident) => {
arm!(
$mode,
$gamemod,
Some(unsafe { NonZeroU8::new_unchecked($discriminant) }),
$intermode,
)
};
($mode:ident, $gamemod:ident, $index:expr, $intermode:ident $(,)?) => {
GameModOrder {
mode: GameMode::$mode,
index: $index,
intermode: GameModIntermode::$intermode,
}
};
}
match gamemod {
GameMod::EasyOsu(_) => arm!(Osu, EasyOsu, Some(2), Easy),
GameMod::NoFailOsu(_) => arm!(Osu, NoFailOsu, Some(1), NoFail),
GameMod::HalfTimeOsu(_) => arm!(Osu, HalfTimeOsu, Some(9), HalfTime),
GameMod::DaycoreOsu(_) => arm!(Osu, DaycoreOsu, None, Daycore),
GameMod::HardRockOsu(_) => arm!(Osu, HardRockOsu, Some(5), HardRock),
GameMod::SuddenDeathOsu(_) => arm!(Osu, SuddenDeathOsu, Some(6), SuddenDeath),
GameMod::PerfectOsu(_) => arm!(Osu, PerfectOsu, Some(15), Perfect),
GameMod::DoubleTimeOsu(_) => arm!(Osu, DoubleTimeOsu, Some(7), DoubleTime),
GameMod::NightcoreOsu(_) => arm!(Osu, NightcoreOsu, Some(10), Nightcore),
GameMod::HiddenOsu(_) => arm!(Osu, HiddenOsu, Some(4), Hidden),
GameMod::FlashlightOsu(_) => arm!(Osu, FlashlightOsu, Some(11), Flashlight),
GameMod::BlindsOsu(_) => arm!(Osu, BlindsOsu, None, Blinds),
GameMod::StrictTrackingOsu(_) => arm!(Osu, StrictTrackingOsu, None, StrictTracking),
GameMod::AccuracyChallengeOsu(_) => {
arm!(Osu, AccuracyChallengeOsu, None, AccuracyChallenge)
}
GameMod::TargetPracticeOsu(_) => {
arm!(Osu, TargetPracticeOsu, Some(24), TargetPractice)
}
GameMod::DifficultyAdjustOsu(_) => {
arm!(Osu, DifficultyAdjustOsu, None, DifficultyAdjust)
}
GameMod::ClassicOsu(_) => arm!(Osu, ClassicOsu, None, Classic),
GameMod::RandomOsu(_) => arm!(Osu, RandomOsu, Some(22), Random),
GameMod::MirrorOsu(_) => arm!(Osu, MirrorOsu, Some(31), Mirror),
GameMod::AlternateOsu(_) => arm!(Osu, AlternateOsu, None, Alternate),
GameMod::SingleTapOsu(_) => arm!(Osu, SingleTapOsu, None, SingleTap),
GameMod::AutoplayOsu(_) => arm!(Osu, AutoplayOsu, Some(12), Autoplay),
GameMod::CinemaOsu(_) => arm!(Osu, CinemaOsu, Some(23), Cinema),
GameMod::RelaxOsu(_) => arm!(Osu, RelaxOsu, Some(8), Relax),
GameMod::AutopilotOsu(_) => arm!(Osu, AutopilotOsu, Some(14), Autopilot),
GameMod::SpunOutOsu(_) => arm!(Osu, SpunOutOsu, Some(13), SpunOut),
GameMod::TransformOsu(_) => arm!(Osu, TransformOsu, None, Transform),
GameMod::WiggleOsu(_) => arm!(Osu, WiggleOsu, None, Wiggle),
GameMod::SpinInOsu(_) => arm!(Osu, SpinInOsu, None, SpinIn),
GameMod::GrowOsu(_) => arm!(Osu, GrowOsu, None, Grow),
GameMod::DeflateOsu(_) => arm!(Osu, DeflateOsu, None, Deflate),
GameMod::WindUpOsu(_) => arm!(Osu, WindUpOsu, None, WindUp),
GameMod::WindDownOsu(_) => arm!(Osu, WindDownOsu, None, WindDown),
GameMod::TraceableOsu(_) => arm!(Osu, TraceableOsu, None, Traceable),
GameMod::BarrelRollOsu(_) => arm!(Osu, BarrelRollOsu, None, BarrelRoll),
GameMod::ApproachDifferentOsu(_) => {
arm!(Osu, ApproachDifferentOsu, None, ApproachDifferent)
}
GameMod::MutedOsu(_) => arm!(Osu, MutedOsu, None, Muted),
GameMod::NoScopeOsu(_) => arm!(Osu, NoScopeOsu, None, NoScope),
GameMod::MagnetisedOsu(_) => arm!(Osu, MagnetisedOsu, None, Magnetised),
GameMod::RepelOsu(_) => arm!(Osu, RepelOsu, None, Repel),
GameMod::AdaptiveSpeedOsu(_) => arm!(Osu, AdaptiveSpeedOsu, None, AdaptiveSpeed),
GameMod::FreezeFrameOsu(_) => arm!(Osu, FreezeFrameOsu, None, FreezeFrame),
GameMod::BubblesOsu(_) => arm!(Osu, BubblesOsu, None, Bubbles),
GameMod::SynesthesiaOsu(_) => arm!(Osu, SynesthesiaOsu, None, Synesthesia),
GameMod::DepthOsu(_) => arm!(Osu, DepthOsu, None, Depth),
GameMod::TouchDeviceOsu(_) => arm!(Osu, TouchDeviceOsu, Some(3), TouchDevice),
GameMod::ScoreV2Osu(_) => arm!(Osu, ScoreV2Osu, Some(30), ScoreV2),
GameMod::UnknownOsu(m) => GameModOrder {
mode: GameMode::Osu,
index: None,
intermode: GameModIntermode::Unknown(*m),
},
GameMod::EasyTaiko(_) => arm!(Taiko, EasyTaiko, Some(2), Easy),
GameMod::NoFailTaiko(_) => arm!(Taiko, NoFailTaiko, Some(1), NoFail),
GameMod::HalfTimeTaiko(_) => arm!(Taiko, HalfTimeTaiko, Some(9), HalfTime),
GameMod::DaycoreTaiko(_) => arm!(Taiko, DaycoreTaiko, None, Daycore),
GameMod::HardRockTaiko(_) => arm!(Taiko, HardRockTaiko, Some(5), HardRock),
GameMod::SuddenDeathTaiko(_) => arm!(Taiko, SuddenDeathTaiko, Some(6), SuddenDeath),
GameMod::PerfectTaiko(_) => arm!(Taiko, PerfectTaiko, Some(15), Perfect),
GameMod::DoubleTimeTaiko(_) => arm!(Taiko, DoubleTimeTaiko, Some(7), DoubleTime),
GameMod::NightcoreTaiko(_) => arm!(Taiko, NightcoreTaiko, Some(10), Nightcore),
GameMod::HiddenTaiko(_) => arm!(Taiko, HiddenTaiko, Some(4), Hidden),
GameMod::FlashlightTaiko(_) => arm!(Taiko, FlashlightTaiko, Some(11), Flashlight),
GameMod::AccuracyChallengeTaiko(_) => {
arm!(Taiko, AccuracyChallengeTaiko, None, AccuracyChallenge)
}
GameMod::RandomTaiko(_) => arm!(Taiko, RandomTaiko, Some(22), Random),
GameMod::DifficultyAdjustTaiko(_) => {
arm!(Taiko, DifficultyAdjustTaiko, None, DifficultyAdjust)
}
GameMod::ClassicTaiko(_) => arm!(Taiko, ClassicTaiko, None, Classic),
GameMod::SwapTaiko(_) => arm!(Taiko, SwapTaiko, None, Swap),
GameMod::SingleTapTaiko(_) => arm!(Taiko, SingleTapTaiko, None, SingleTap),
GameMod::ConstantSpeedTaiko(_) => {
arm!(Taiko, ConstantSpeedTaiko, None, ConstantSpeed)
}
GameMod::AutoplayTaiko(_) => arm!(Taiko, AutoplayTaiko, Some(12), Autoplay),
GameMod::CinemaTaiko(_) => arm!(Taiko, CinemaTaiko, Some(23), Cinema),
GameMod::RelaxTaiko(_) => arm!(Taiko, RelaxTaiko, Some(8), Relax),
GameMod::WindUpTaiko(_) => arm!(Taiko, WindUpTaiko, None, WindUp),
GameMod::WindDownTaiko(_) => arm!(Taiko, WindDownTaiko, None, WindDown),
GameMod::MutedTaiko(_) => arm!(Taiko, MutedTaiko, None, Muted),
GameMod::AdaptiveSpeedTaiko(_) => {
arm!(Taiko, AdaptiveSpeedTaiko, None, AdaptiveSpeed)
}
GameMod::ScoreV2Taiko(_) => arm!(Taiko, ScoreV2Taiko, Some(30), ScoreV2),
GameMod::UnknownTaiko(m) => GameModOrder {
mode: GameMode::Taiko,
index: None,
intermode: GameModIntermode::Unknown(*m),
},
GameMod::EasyCatch(_) => arm!(Catch, EasyCatch, Some(2), Easy),
GameMod::NoFailCatch(_) => arm!(Catch, NoFailCatch, Some(1), NoFail),
GameMod::HalfTimeCatch(_) => arm!(Catch, HalfTimeCatch, Some(9), HalfTime),
GameMod::DaycoreCatch(_) => arm!(Catch, DaycoreCatch, None, Daycore),
GameMod::HardRockCatch(_) => arm!(Catch, HardRockCatch, Some(5), HardRock),
GameMod::SuddenDeathCatch(_) => arm!(Catch, SuddenDeathCatch, Some(6), SuddenDeath),
GameMod::PerfectCatch(_) => arm!(Catch, PerfectCatch, Some(15), Perfect),
GameMod::DoubleTimeCatch(_) => arm!(Catch, DoubleTimeCatch, Some(7), DoubleTime),
GameMod::NightcoreCatch(_) => arm!(Catch, NightcoreCatch, Some(10), Nightcore),
GameMod::HiddenCatch(_) => arm!(Catch, HiddenCatch, Some(4), Hidden),
GameMod::FlashlightCatch(_) => arm!(Catch, FlashlightCatch, Some(11), Flashlight),
GameMod::AccuracyChallengeCatch(_) => {
arm!(Catch, AccuracyChallengeCatch, None, AccuracyChallenge)
}
GameMod::DifficultyAdjustCatch(_) => {
arm!(Catch, DifficultyAdjustCatch, None, DifficultyAdjust)
}
GameMod::ClassicCatch(_) => arm!(Catch, ClassicCatch, None, Classic),
GameMod::MirrorCatch(_) => arm!(Catch, MirrorCatch, Some(31), Mirror),
GameMod::AutoplayCatch(_) => arm!(Catch, AutoplayCatch, Some(12), Autoplay),
GameMod::CinemaCatch(_) => arm!(Catch, CinemaCatch, Some(23), Cinema),
GameMod::RelaxCatch(_) => arm!(Catch, RelaxCatch, Some(8), Relax),
GameMod::WindUpCatch(_) => arm!(Catch, WindUpCatch, None, WindUp),
GameMod::WindDownCatch(_) => arm!(Catch, WindDownCatch, None, WindDown),
GameMod::FloatingFruitsCatch(_) => {
arm!(Catch, FloatingFruitsCatch, None, FloatingFruits)
}
GameMod::MutedCatch(_) => arm!(Catch, MutedCatch, None, Muted),
GameMod::NoScopeCatch(_) => arm!(Catch, NoScopeCatch, None, NoScope),
GameMod::ScoreV2Catch(_) => arm!(Catch, ScoreV2Catch, Some(30), ScoreV2),
GameMod::UnknownCatch(m) => GameModOrder {
mode: GameMode::Catch,
index: None,
intermode: GameModIntermode::Unknown(*m),
},
GameMod::EasyMania(_) => arm!(Mania, EasyMania, Some(2), Easy),
GameMod::NoFailMania(_) => arm!(Mania, NoFailMania, Some(1), NoFail),
GameMod::HalfTimeMania(_) => arm!(Mania, HalfTimeMania, Some(9), HalfTime),
GameMod::DaycoreMania(_) => arm!(Mania, DaycoreMania, None, Daycore),
GameMod::NoReleaseMania(_) => arm!(Mania, NoReleaseMania, None, NoRelease),
GameMod::HardRockMania(_) => arm!(Mania, HardRockMania, Some(5), HardRock),
GameMod::SuddenDeathMania(_) => arm!(Mania, SuddenDeathMania, Some(6), SuddenDeath),
GameMod::PerfectMania(_) => arm!(Mania, PerfectMania, Some(15), Perfect),
GameMod::DoubleTimeMania(_) => arm!(Mania, DoubleTimeMania, Some(7), DoubleTime),
GameMod::NightcoreMania(_) => arm!(Mania, NightcoreMania, Some(10), Nightcore),
GameMod::FadeInMania(_) => arm!(Mania, FadeInMania, Some(21), FadeIn),
GameMod::HiddenMania(_) => arm!(Mania, HiddenMania, Some(4), Hidden),
GameMod::CoverMania(_) => arm!(Mania, CoverMania, None, Cover),
GameMod::FlashlightMania(_) => arm!(Mania, FlashlightMania, Some(11), Flashlight),
GameMod::AccuracyChallengeMania(_) => {
arm!(Mania, AccuracyChallengeMania, None, AccuracyChallenge)
}
GameMod::RandomMania(_) => arm!(Mania, RandomMania, Some(22), Random),
GameMod::DualStagesMania(_) => arm!(Mania, DualStagesMania, Some(26), DualStages),
GameMod::MirrorMania(_) => arm!(Mania, MirrorMania, Some(31), Mirror),
GameMod::DifficultyAdjustMania(_) => {
arm!(Mania, DifficultyAdjustMania, None, DifficultyAdjust)
}
GameMod::ClassicMania(_) => arm!(Mania, ClassicMania, None, Classic),
GameMod::InvertMania(_) => arm!(Mania, InvertMania, None, Invert),
GameMod::ConstantSpeedMania(_) => {
arm!(Mania, ConstantSpeedMania, None, ConstantSpeed)
}
GameMod::HoldOffMania(_) => arm!(Mania, HoldOffMania, None, HoldOff),
GameMod::OneKeyMania(_) => arm!(Mania, OneKeyMania, Some(27), OneKey),
GameMod::TwoKeysMania(_) => arm!(Mania, TwoKeysMania, Some(29), TwoKeys),
GameMod::ThreeKeysMania(_) => arm!(Mania, ThreeKeysMania, Some(28), ThreeKeys),
GameMod::FourKeysMania(_) => arm!(Mania, FourKeysMania, Some(16), FourKeys),
GameMod::FiveKeysMania(_) => arm!(Mania, FiveKeysMania, Some(17), FiveKeys),
GameMod::SixKeysMania(_) => arm!(Mania, SixKeysMania, Some(18), SixKeys),
GameMod::SevenKeysMania(_) => arm!(Mania, SevenKeysMania, Some(19), SevenKeys),
GameMod::EightKeysMania(_) => arm!(Mania, EightKeysMania, Some(20), EightKeys),
GameMod::NineKeysMania(_) => arm!(Mania, NineKeysMania, Some(25), NineKeys),
GameMod::TenKeysMania(_) => arm!(Mania, TenKeysMania, None, TenKeys),
GameMod::AutoplayMania(_) => arm!(Mania, AutoplayMania, Some(12), Autoplay),
GameMod::CinemaMania(_) => arm!(Mania, CinemaMania, Some(23), Cinema),
GameMod::WindUpMania(_) => arm!(Mania, WindUpMania, None, WindUp),
GameMod::WindDownMania(_) => arm!(Mania, WindDownMania, None, WindDown),
GameMod::MutedMania(_) => arm!(Mania, MutedMania, None, Muted),
GameMod::AdaptiveSpeedMania(_) => {
arm!(Mania, AdaptiveSpeedMania, None, AdaptiveSpeed)
}
GameMod::ScoreV2Mania(_) => arm!(Mania, ScoreV2Mania, Some(30), ScoreV2),
GameMod::UnknownMania(m) => GameModOrder {
mode: GameMode::Mania,
index: None,
intermode: GameModIntermode::Unknown(*m),
},
}
}
inner(gamemod)
}
}
impl PartialOrd for GameModOrder {
fn partial_cmp(&self, other: &Self) -> Option<Ordering> {
Some(self.cmp(other))
}
}
impl Ord for GameModOrder {
fn cmp(&self, other: &Self) -> Ordering {
self.mode
.cmp(&other.mode)
.then_with(|| match (self.index, other.index) {
(Some(self_idx), Some(other_idx)) => self_idx.cmp(&other_idx),
(Some(_), None) => Ordering::Less,
(None, Some(_)) => Ordering::Greater,
(None, None) => self
.intermode
.acronym()
.as_str()
.cmp(other.intermode.acronym().as_str()),
})
}
}
impl PartialEq<GameModIntermode> for GameModOrder {
fn eq(&self, other: &GameModIntermode) -> bool {
self.intermode.eq(other)
}
}
impl Borrow<GameModIntermode> for GameModOrder {
fn borrow(&self) -> &GameModIntermode {
&self.intermode
}
}
pub(crate) mod gamemod {
use super::*;
#[derive(Clone, Debug, PartialEq)]
#[cfg_attr(
feature = "rkyv",
derive(::rkyv::Archive, ::rkyv::Serialize, ::rkyv::Deserialize)
)]
#[non_exhaustive]
pub enum GameMod {
EasyOsu(EasyOsu),
NoFailOsu(NoFailOsu),
HalfTimeOsu(HalfTimeOsu),
DaycoreOsu(DaycoreOsu),
HardRockOsu(HardRockOsu),
SuddenDeathOsu(SuddenDeathOsu),
PerfectOsu(PerfectOsu),
DoubleTimeOsu(DoubleTimeOsu),
NightcoreOsu(NightcoreOsu),
HiddenOsu(HiddenOsu),
FlashlightOsu(FlashlightOsu),
BlindsOsu(BlindsOsu),
StrictTrackingOsu(StrictTrackingOsu),
AccuracyChallengeOsu(AccuracyChallengeOsu),
TargetPracticeOsu(TargetPracticeOsu),
DifficultyAdjustOsu(DifficultyAdjustOsu),
ClassicOsu(ClassicOsu),
RandomOsu(RandomOsu),
MirrorOsu(MirrorOsu),
AlternateOsu(AlternateOsu),
SingleTapOsu(SingleTapOsu),
AutoplayOsu(AutoplayOsu),
CinemaOsu(CinemaOsu),
RelaxOsu(RelaxOsu),
AutopilotOsu(AutopilotOsu),
SpunOutOsu(SpunOutOsu),
TransformOsu(TransformOsu),
WiggleOsu(WiggleOsu),
SpinInOsu(SpinInOsu),
GrowOsu(GrowOsu),
DeflateOsu(DeflateOsu),
WindUpOsu(WindUpOsu),
WindDownOsu(WindDownOsu),
TraceableOsu(TraceableOsu),
BarrelRollOsu(BarrelRollOsu),
ApproachDifferentOsu(ApproachDifferentOsu),
MutedOsu(MutedOsu),
NoScopeOsu(NoScopeOsu),
MagnetisedOsu(MagnetisedOsu),
RepelOsu(RepelOsu),
AdaptiveSpeedOsu(AdaptiveSpeedOsu),
FreezeFrameOsu(FreezeFrameOsu),
BubblesOsu(BubblesOsu),
SynesthesiaOsu(SynesthesiaOsu),
DepthOsu(DepthOsu),
TouchDeviceOsu(TouchDeviceOsu),
ScoreV2Osu(ScoreV2Osu),
UnknownOsu(UnknownMod),
EasyTaiko(EasyTaiko),
NoFailTaiko(NoFailTaiko),
HalfTimeTaiko(HalfTimeTaiko),
DaycoreTaiko(DaycoreTaiko),
HardRockTaiko(HardRockTaiko),
SuddenDeathTaiko(SuddenDeathTaiko),
PerfectTaiko(PerfectTaiko),
DoubleTimeTaiko(DoubleTimeTaiko),
NightcoreTaiko(NightcoreTaiko),
HiddenTaiko(HiddenTaiko),
FlashlightTaiko(FlashlightTaiko),
AccuracyChallengeTaiko(AccuracyChallengeTaiko),
RandomTaiko(RandomTaiko),
DifficultyAdjustTaiko(DifficultyAdjustTaiko),
ClassicTaiko(ClassicTaiko),
SwapTaiko(SwapTaiko),
SingleTapTaiko(SingleTapTaiko),
ConstantSpeedTaiko(ConstantSpeedTaiko),
AutoplayTaiko(AutoplayTaiko),
CinemaTaiko(CinemaTaiko),
RelaxTaiko(RelaxTaiko),
WindUpTaiko(WindUpTaiko),
WindDownTaiko(WindDownTaiko),
MutedTaiko(MutedTaiko),
AdaptiveSpeedTaiko(AdaptiveSpeedTaiko),
ScoreV2Taiko(ScoreV2Taiko),
UnknownTaiko(UnknownMod),
EasyCatch(EasyCatch),
NoFailCatch(NoFailCatch),
HalfTimeCatch(HalfTimeCatch),
DaycoreCatch(DaycoreCatch),
HardRockCatch(HardRockCatch),
SuddenDeathCatch(SuddenDeathCatch),
PerfectCatch(PerfectCatch),
DoubleTimeCatch(DoubleTimeCatch),
NightcoreCatch(NightcoreCatch),
HiddenCatch(HiddenCatch),
FlashlightCatch(FlashlightCatch),
AccuracyChallengeCatch(AccuracyChallengeCatch),
DifficultyAdjustCatch(DifficultyAdjustCatch),
ClassicCatch(ClassicCatch),
MirrorCatch(MirrorCatch),
AutoplayCatch(AutoplayCatch),
CinemaCatch(CinemaCatch),
RelaxCatch(RelaxCatch),
WindUpCatch(WindUpCatch),
WindDownCatch(WindDownCatch),
FloatingFruitsCatch(FloatingFruitsCatch),
MutedCatch(MutedCatch),
NoScopeCatch(NoScopeCatch),
ScoreV2Catch(ScoreV2Catch),
UnknownCatch(UnknownMod),
EasyMania(EasyMania),
NoFailMania(NoFailMania),
HalfTimeMania(HalfTimeMania),
DaycoreMania(DaycoreMania),
NoReleaseMania(NoReleaseMania),
HardRockMania(HardRockMania),
SuddenDeathMania(SuddenDeathMania),
PerfectMania(PerfectMania),
DoubleTimeMania(DoubleTimeMania),
NightcoreMania(NightcoreMania),
FadeInMania(FadeInMania),
HiddenMania(HiddenMania),
CoverMania(CoverMania),
FlashlightMania(FlashlightMania),
AccuracyChallengeMania(AccuracyChallengeMania),
RandomMania(RandomMania),
DualStagesMania(DualStagesMania),
MirrorMania(MirrorMania),
DifficultyAdjustMania(DifficultyAdjustMania),
ClassicMania(ClassicMania),
InvertMania(InvertMania),
ConstantSpeedMania(ConstantSpeedMania),
HoldOffMania(HoldOffMania),
OneKeyMania(OneKeyMania),
TwoKeysMania(TwoKeysMania),
ThreeKeysMania(ThreeKeysMania),
FourKeysMania(FourKeysMania),
FiveKeysMania(FiveKeysMania),
SixKeysMania(SixKeysMania),
SevenKeysMania(SevenKeysMania),
EightKeysMania(EightKeysMania),
NineKeysMania(NineKeysMania),
TenKeysMania(TenKeysMania),
AutoplayMania(AutoplayMania),
CinemaMania(CinemaMania),
WindUpMania(WindUpMania),
WindDownMania(WindDownMania),
MutedMania(MutedMania),
AdaptiveSpeedMania(AdaptiveSpeedMania),
ScoreV2Mania(ScoreV2Mania),
UnknownMania(UnknownMod),
}
}
impl GameMod {
pub fn new(acronym: &str, mode: GameMode) -> Self {
match (acronym, mode) {
("EZ", GameMode::Osu) => Self::EasyOsu(Default::default()),
("NF", GameMode::Osu) => Self::NoFailOsu(Default::default()),
("HT", GameMode::Osu) => Self::HalfTimeOsu(Default::default()),
("DC", GameMode::Osu) => Self::DaycoreOsu(Default::default()),
("HR", GameMode::Osu) => Self::HardRockOsu(Default::default()),
("SD", GameMode::Osu) => Self::SuddenDeathOsu(Default::default()),
("PF", GameMode::Osu) => Self::PerfectOsu(Default::default()),
("DT", GameMode::Osu) => Self::DoubleTimeOsu(Default::default()),
("NC", GameMode::Osu) => Self::NightcoreOsu(Default::default()),
("HD", GameMode::Osu) => Self::HiddenOsu(Default::default()),
("FL", GameMode::Osu) => Self::FlashlightOsu(Default::default()),
("BL", GameMode::Osu) => Self::BlindsOsu(Default::default()),
("ST", GameMode::Osu) => Self::StrictTrackingOsu(Default::default()),
("AC", GameMode::Osu) => Self::AccuracyChallengeOsu(Default::default()),
("TP", GameMode::Osu) => Self::TargetPracticeOsu(Default::default()),
("DA", GameMode::Osu) => Self::DifficultyAdjustOsu(Default::default()),
("CL", GameMode::Osu) => Self::ClassicOsu(Default::default()),
("RD", GameMode::Osu) => Self::RandomOsu(Default::default()),
("MR", GameMode::Osu) => Self::MirrorOsu(Default::default()),
("AL", GameMode::Osu) => Self::AlternateOsu(Default::default()),
("SG", GameMode::Osu) => Self::SingleTapOsu(Default::default()),
("AT", GameMode::Osu) => Self::AutoplayOsu(Default::default()),
("CN", GameMode::Osu) => Self::CinemaOsu(Default::default()),
("RX", GameMode::Osu) => Self::RelaxOsu(Default::default()),
("AP", GameMode::Osu) => Self::AutopilotOsu(Default::default()),
("SO", GameMode::Osu) => Self::SpunOutOsu(Default::default()),
("TR", GameMode::Osu) => Self::TransformOsu(Default::default()),
("WG", GameMode::Osu) => Self::WiggleOsu(Default::default()),
("SI", GameMode::Osu) => Self::SpinInOsu(Default::default()),
("GR", GameMode::Osu) => Self::GrowOsu(Default::default()),
("DF", GameMode::Osu) => Self::DeflateOsu(Default::default()),
("WU", GameMode::Osu) => Self::WindUpOsu(Default::default()),
("WD", GameMode::Osu) => Self::WindDownOsu(Default::default()),
("TC", GameMode::Osu) => Self::TraceableOsu(Default::default()),
("BR", GameMode::Osu) => Self::BarrelRollOsu(Default::default()),
("AD", GameMode::Osu) => Self::ApproachDifferentOsu(Default::default()),
("MU", GameMode::Osu) => Self::MutedOsu(Default::default()),
("NS", GameMode::Osu) => Self::NoScopeOsu(Default::default()),
("MG", GameMode::Osu) => Self::MagnetisedOsu(Default::default()),
("RP", GameMode::Osu) => Self::RepelOsu(Default::default()),
("AS", GameMode::Osu) => Self::AdaptiveSpeedOsu(Default::default()),
("FR", GameMode::Osu) => Self::FreezeFrameOsu(Default::default()),
("BU", GameMode::Osu) => Self::BubblesOsu(Default::default()),
("SY", GameMode::Osu) => Self::SynesthesiaOsu(Default::default()),
("DP", GameMode::Osu) => Self::DepthOsu(Default::default()),
("TD", GameMode::Osu) => Self::TouchDeviceOsu(Default::default()),
("SV2", GameMode::Osu) => Self::ScoreV2Osu(Default::default()),
("EZ", GameMode::Taiko) => Self::EasyTaiko(Default::default()),
("NF", GameMode::Taiko) => Self::NoFailTaiko(Default::default()),
("HT", GameMode::Taiko) => Self::HalfTimeTaiko(Default::default()),
("DC", GameMode::Taiko) => Self::DaycoreTaiko(Default::default()),
("HR", GameMode::Taiko) => Self::HardRockTaiko(Default::default()),
("SD", GameMode::Taiko) => Self::SuddenDeathTaiko(Default::default()),
("PF", GameMode::Taiko) => Self::PerfectTaiko(Default::default()),
("DT", GameMode::Taiko) => Self::DoubleTimeTaiko(Default::default()),
("NC", GameMode::Taiko) => Self::NightcoreTaiko(Default::default()),
("HD", GameMode::Taiko) => Self::HiddenTaiko(Default::default()),
("FL", GameMode::Taiko) => Self::FlashlightTaiko(Default::default()),
("AC", GameMode::Taiko) => Self::AccuracyChallengeTaiko(Default::default()),
("RD", GameMode::Taiko) => Self::RandomTaiko(Default::default()),
("DA", GameMode::Taiko) => Self::DifficultyAdjustTaiko(Default::default()),
("CL", GameMode::Taiko) => Self::ClassicTaiko(Default::default()),
("SW", GameMode::Taiko) => Self::SwapTaiko(Default::default()),
("SG", GameMode::Taiko) => Self::SingleTapTaiko(Default::default()),
("CS", GameMode::Taiko) => Self::ConstantSpeedTaiko(Default::default()),
("AT", GameMode::Taiko) => Self::AutoplayTaiko(Default::default()),
("CN", GameMode::Taiko) => Self::CinemaTaiko(Default::default()),
("RX", GameMode::Taiko) => Self::RelaxTaiko(Default::default()),
("WU", GameMode::Taiko) => Self::WindUpTaiko(Default::default()),
("WD", GameMode::Taiko) => Self::WindDownTaiko(Default::default()),
("MU", GameMode::Taiko) => Self::MutedTaiko(Default::default()),
("AS", GameMode::Taiko) => Self::AdaptiveSpeedTaiko(Default::default()),
("SV2", GameMode::Taiko) => Self::ScoreV2Taiko(Default::default()),
("EZ", GameMode::Catch) => Self::EasyCatch(Default::default()),
("NF", GameMode::Catch) => Self::NoFailCatch(Default::default()),
("HT", GameMode::Catch) => Self::HalfTimeCatch(Default::default()),
("DC", GameMode::Catch) => Self::DaycoreCatch(Default::default()),
("HR", GameMode::Catch) => Self::HardRockCatch(Default::default()),
("SD", GameMode::Catch) => Self::SuddenDeathCatch(Default::default()),
("PF", GameMode::Catch) => Self::PerfectCatch(Default::default()),
("DT", GameMode::Catch) => Self::DoubleTimeCatch(Default::default()),
("NC", GameMode::Catch) => Self::NightcoreCatch(Default::default()),
("HD", GameMode::Catch) => Self::HiddenCatch(Default::default()),
("FL", GameMode::Catch) => Self::FlashlightCatch(Default::default()),
("AC", GameMode::Catch) => Self::AccuracyChallengeCatch(Default::default()),
("DA", GameMode::Catch) => Self::DifficultyAdjustCatch(Default::default()),
("CL", GameMode::Catch) => Self::ClassicCatch(Default::default()),
("MR", GameMode::Catch) => Self::MirrorCatch(Default::default()),
("AT", GameMode::Catch) => Self::AutoplayCatch(Default::default()),
("CN", GameMode::Catch) => Self::CinemaCatch(Default::default()),
("RX", GameMode::Catch) => Self::RelaxCatch(Default::default()),
("WU", GameMode::Catch) => Self::WindUpCatch(Default::default()),
("WD", GameMode::Catch) => Self::WindDownCatch(Default::default()),
("FF", GameMode::Catch) => Self::FloatingFruitsCatch(Default::default()),
("MU", GameMode::Catch) => Self::MutedCatch(Default::default()),
("NS", GameMode::Catch) => Self::NoScopeCatch(Default::default()),
("SV2", GameMode::Catch) => Self::ScoreV2Catch(Default::default()),
("EZ", GameMode::Mania) => Self::EasyMania(Default::default()),
("NF", GameMode::Mania) => Self::NoFailMania(Default::default()),
("HT", GameMode::Mania) => Self::HalfTimeMania(Default::default()),
("DC", GameMode::Mania) => Self::DaycoreMania(Default::default()),
("NR", GameMode::Mania) => Self::NoReleaseMania(Default::default()),
("HR", GameMode::Mania) => Self::HardRockMania(Default::default()),
("SD", GameMode::Mania) => Self::SuddenDeathMania(Default::default()),
("PF", GameMode::Mania) => Self::PerfectMania(Default::default()),
("DT", GameMode::Mania) => Self::DoubleTimeMania(Default::default()),
("NC", GameMode::Mania) => Self::NightcoreMania(Default::default()),
("FI", GameMode::Mania) => Self::FadeInMania(Default::default()),
("HD", GameMode::Mania) => Self::HiddenMania(Default::default()),
("CO", GameMode::Mania) => Self::CoverMania(Default::default()),
("FL", GameMode::Mania) => Self::FlashlightMania(Default::default()),
("AC", GameMode::Mania) => Self::AccuracyChallengeMania(Default::default()),
("RD", GameMode::Mania) => Self::RandomMania(Default::default()),
("DS", GameMode::Mania) => Self::DualStagesMania(Default::default()),
("MR", GameMode::Mania) => Self::MirrorMania(Default::default()),
("DA", GameMode::Mania) => Self::DifficultyAdjustMania(Default::default()),
("CL", GameMode::Mania) => Self::ClassicMania(Default::default()),
("IN", GameMode::Mania) => Self::InvertMania(Default::default()),
("CS", GameMode::Mania) => Self::ConstantSpeedMania(Default::default()),
("HO", GameMode::Mania) => Self::HoldOffMania(Default::default()),
("1K", GameMode::Mania) => Self::OneKeyMania(Default::default()),
("2K", GameMode::Mania) => Self::TwoKeysMania(Default::default()),
("3K", GameMode::Mania) => Self::ThreeKeysMania(Default::default()),
("4K", GameMode::Mania) => Self::FourKeysMania(Default::default()),
("5K", GameMode::Mania) => Self::FiveKeysMania(Default::default()),
("6K", GameMode::Mania) => Self::SixKeysMania(Default::default()),
("7K", GameMode::Mania) => Self::SevenKeysMania(Default::default()),
("8K", GameMode::Mania) => Self::EightKeysMania(Default::default()),
("9K", GameMode::Mania) => Self::NineKeysMania(Default::default()),
("10K", GameMode::Mania) => Self::TenKeysMania(Default::default()),
("AT", GameMode::Mania) => Self::AutoplayMania(Default::default()),
("CN", GameMode::Mania) => Self::CinemaMania(Default::default()),
("WU", GameMode::Mania) => Self::WindUpMania(Default::default()),
("WD", GameMode::Mania) => Self::WindDownMania(Default::default()),
("MU", GameMode::Mania) => Self::MutedMania(Default::default()),
("AS", GameMode::Mania) => Self::AdaptiveSpeedMania(Default::default()),
("SV2", GameMode::Mania) => Self::ScoreV2Mania(Default::default()),
_ => {
let acronym = <Acronym as std::str::FromStr>::from_str(acronym)
.unwrap_or(UnknownMod::UNKNOWN_ACRONYM);
let unknown = UnknownMod { acronym };
match mode {
GameMode::Osu => GameMod::UnknownOsu(unknown),
GameMode::Taiko => GameMod::UnknownTaiko(unknown),
GameMode::Catch => GameMod::UnknownCatch(unknown),
GameMode::Mania => GameMod::UnknownMania(unknown),
}
}
}
}
pub const fn acronym(&self) -> Acronym {
match self {
Self::EasyOsu(_) => EasyOsu::acronym(),
Self::NoFailOsu(_) => NoFailOsu::acronym(),
Self::HalfTimeOsu(_) => HalfTimeOsu::acronym(),
Self::DaycoreOsu(_) => DaycoreOsu::acronym(),
Self::HardRockOsu(_) => HardRockOsu::acronym(),
Self::SuddenDeathOsu(_) => SuddenDeathOsu::acronym(),
Self::PerfectOsu(_) => PerfectOsu::acronym(),
Self::DoubleTimeOsu(_) => DoubleTimeOsu::acronym(),
Self::NightcoreOsu(_) => NightcoreOsu::acronym(),
Self::HiddenOsu(_) => HiddenOsu::acronym(),
Self::FlashlightOsu(_) => FlashlightOsu::acronym(),
Self::BlindsOsu(_) => BlindsOsu::acronym(),
Self::StrictTrackingOsu(_) => StrictTrackingOsu::acronym(),
Self::AccuracyChallengeOsu(_) => AccuracyChallengeOsu::acronym(),
Self::TargetPracticeOsu(_) => TargetPracticeOsu::acronym(),
Self::DifficultyAdjustOsu(_) => DifficultyAdjustOsu::acronym(),
Self::ClassicOsu(_) => ClassicOsu::acronym(),
Self::RandomOsu(_) => RandomOsu::acronym(),
Self::MirrorOsu(_) => MirrorOsu::acronym(),
Self::AlternateOsu(_) => AlternateOsu::acronym(),
Self::SingleTapOsu(_) => SingleTapOsu::acronym(),
Self::AutoplayOsu(_) => AutoplayOsu::acronym(),
Self::CinemaOsu(_) => CinemaOsu::acronym(),
Self::RelaxOsu(_) => RelaxOsu::acronym(),
Self::AutopilotOsu(_) => AutopilotOsu::acronym(),
Self::SpunOutOsu(_) => SpunOutOsu::acronym(),
Self::TransformOsu(_) => TransformOsu::acronym(),
Self::WiggleOsu(_) => WiggleOsu::acronym(),
Self::SpinInOsu(_) => SpinInOsu::acronym(),
Self::GrowOsu(_) => GrowOsu::acronym(),
Self::DeflateOsu(_) => DeflateOsu::acronym(),
Self::WindUpOsu(_) => WindUpOsu::acronym(),
Self::WindDownOsu(_) => WindDownOsu::acronym(),
Self::TraceableOsu(_) => TraceableOsu::acronym(),
Self::BarrelRollOsu(_) => BarrelRollOsu::acronym(),
Self::ApproachDifferentOsu(_) => ApproachDifferentOsu::acronym(),
Self::MutedOsu(_) => MutedOsu::acronym(),
Self::NoScopeOsu(_) => NoScopeOsu::acronym(),
Self::MagnetisedOsu(_) => MagnetisedOsu::acronym(),
Self::RepelOsu(_) => RepelOsu::acronym(),
Self::AdaptiveSpeedOsu(_) => AdaptiveSpeedOsu::acronym(),
Self::FreezeFrameOsu(_) => FreezeFrameOsu::acronym(),
Self::BubblesOsu(_) => BubblesOsu::acronym(),
Self::SynesthesiaOsu(_) => SynesthesiaOsu::acronym(),
Self::DepthOsu(_) => DepthOsu::acronym(),
Self::TouchDeviceOsu(_) => TouchDeviceOsu::acronym(),
Self::ScoreV2Osu(_) => ScoreV2Osu::acronym(),
Self::EasyTaiko(_) => EasyTaiko::acronym(),
Self::NoFailTaiko(_) => NoFailTaiko::acronym(),
Self::HalfTimeTaiko(_) => HalfTimeTaiko::acronym(),
Self::DaycoreTaiko(_) => DaycoreTaiko::acronym(),
Self::HardRockTaiko(_) => HardRockTaiko::acronym(),
Self::SuddenDeathTaiko(_) => SuddenDeathTaiko::acronym(),
Self::PerfectTaiko(_) => PerfectTaiko::acronym(),
Self::DoubleTimeTaiko(_) => DoubleTimeTaiko::acronym(),
Self::NightcoreTaiko(_) => NightcoreTaiko::acronym(),
Self::HiddenTaiko(_) => HiddenTaiko::acronym(),
Self::FlashlightTaiko(_) => FlashlightTaiko::acronym(),
Self::AccuracyChallengeTaiko(_) => AccuracyChallengeTaiko::acronym(),
Self::RandomTaiko(_) => RandomTaiko::acronym(),
Self::DifficultyAdjustTaiko(_) => DifficultyAdjustTaiko::acronym(),
Self::ClassicTaiko(_) => ClassicTaiko::acronym(),
Self::SwapTaiko(_) => SwapTaiko::acronym(),
Self::SingleTapTaiko(_) => SingleTapTaiko::acronym(),
Self::ConstantSpeedTaiko(_) => ConstantSpeedTaiko::acronym(),
Self::AutoplayTaiko(_) => AutoplayTaiko::acronym(),
Self::CinemaTaiko(_) => CinemaTaiko::acronym(),
Self::RelaxTaiko(_) => RelaxTaiko::acronym(),
Self::WindUpTaiko(_) => WindUpTaiko::acronym(),
Self::WindDownTaiko(_) => WindDownTaiko::acronym(),
Self::MutedTaiko(_) => MutedTaiko::acronym(),
Self::AdaptiveSpeedTaiko(_) => AdaptiveSpeedTaiko::acronym(),
Self::ScoreV2Taiko(_) => ScoreV2Taiko::acronym(),
Self::EasyCatch(_) => EasyCatch::acronym(),
Self::NoFailCatch(_) => NoFailCatch::acronym(),
Self::HalfTimeCatch(_) => HalfTimeCatch::acronym(),
Self::DaycoreCatch(_) => DaycoreCatch::acronym(),
Self::HardRockCatch(_) => HardRockCatch::acronym(),
Self::SuddenDeathCatch(_) => SuddenDeathCatch::acronym(),
Self::PerfectCatch(_) => PerfectCatch::acronym(),
Self::DoubleTimeCatch(_) => DoubleTimeCatch::acronym(),
Self::NightcoreCatch(_) => NightcoreCatch::acronym(),
Self::HiddenCatch(_) => HiddenCatch::acronym(),
Self::FlashlightCatch(_) => FlashlightCatch::acronym(),
Self::AccuracyChallengeCatch(_) => AccuracyChallengeCatch::acronym(),
Self::DifficultyAdjustCatch(_) => DifficultyAdjustCatch::acronym(),
Self::ClassicCatch(_) => ClassicCatch::acronym(),
Self::MirrorCatch(_) => MirrorCatch::acronym(),
Self::AutoplayCatch(_) => AutoplayCatch::acronym(),
Self::CinemaCatch(_) => CinemaCatch::acronym(),
Self::RelaxCatch(_) => RelaxCatch::acronym(),
Self::WindUpCatch(_) => WindUpCatch::acronym(),
Self::WindDownCatch(_) => WindDownCatch::acronym(),
Self::FloatingFruitsCatch(_) => FloatingFruitsCatch::acronym(),
Self::MutedCatch(_) => MutedCatch::acronym(),
Self::NoScopeCatch(_) => NoScopeCatch::acronym(),
Self::ScoreV2Catch(_) => ScoreV2Catch::acronym(),
Self::EasyMania(_) => EasyMania::acronym(),
Self::NoFailMania(_) => NoFailMania::acronym(),
Self::HalfTimeMania(_) => HalfTimeMania::acronym(),
Self::DaycoreMania(_) => DaycoreMania::acronym(),
Self::NoReleaseMania(_) => NoReleaseMania::acronym(),
Self::HardRockMania(_) => HardRockMania::acronym(),
Self::SuddenDeathMania(_) => SuddenDeathMania::acronym(),
Self::PerfectMania(_) => PerfectMania::acronym(),
Self::DoubleTimeMania(_) => DoubleTimeMania::acronym(),
Self::NightcoreMania(_) => NightcoreMania::acronym(),
Self::FadeInMania(_) => FadeInMania::acronym(),
Self::HiddenMania(_) => HiddenMania::acronym(),
Self::CoverMania(_) => CoverMania::acronym(),
Self::FlashlightMania(_) => FlashlightMania::acronym(),
Self::AccuracyChallengeMania(_) => AccuracyChallengeMania::acronym(),
Self::RandomMania(_) => RandomMania::acronym(),
Self::DualStagesMania(_) => DualStagesMania::acronym(),
Self::MirrorMania(_) => MirrorMania::acronym(),
Self::DifficultyAdjustMania(_) => DifficultyAdjustMania::acronym(),
Self::ClassicMania(_) => ClassicMania::acronym(),
Self::InvertMania(_) => InvertMania::acronym(),
Self::ConstantSpeedMania(_) => ConstantSpeedMania::acronym(),
Self::HoldOffMania(_) => HoldOffMania::acronym(),
Self::OneKeyMania(_) => OneKeyMania::acronym(),
Self::TwoKeysMania(_) => TwoKeysMania::acronym(),
Self::ThreeKeysMania(_) => ThreeKeysMania::acronym(),
Self::FourKeysMania(_) => FourKeysMania::acronym(),
Self::FiveKeysMania(_) => FiveKeysMania::acronym(),
Self::SixKeysMania(_) => SixKeysMania::acronym(),
Self::SevenKeysMania(_) => SevenKeysMania::acronym(),
Self::EightKeysMania(_) => EightKeysMania::acronym(),
Self::NineKeysMania(_) => NineKeysMania::acronym(),
Self::TenKeysMania(_) => TenKeysMania::acronym(),
Self::AutoplayMania(_) => AutoplayMania::acronym(),
Self::CinemaMania(_) => CinemaMania::acronym(),
Self::WindUpMania(_) => WindUpMania::acronym(),
Self::WindDownMania(_) => WindDownMania::acronym(),
Self::MutedMania(_) => MutedMania::acronym(),
Self::AdaptiveSpeedMania(_) => AdaptiveSpeedMania::acronym(),
Self::ScoreV2Mania(_) => ScoreV2Mania::acronym(),
Self::UnknownOsu(m)
| Self::UnknownTaiko(m)
| Self::UnknownCatch(m)
| Self::UnknownMania(m) => m.acronym(),
}
}
pub fn incompatible_mods(&self) -> Box<[Acronym]> {
match self {
Self::EasyOsu(_) => EasyOsu::incompatible_mods().collect(),
Self::NoFailOsu(_) => NoFailOsu::incompatible_mods().collect(),
Self::HalfTimeOsu(_) => HalfTimeOsu::incompatible_mods().collect(),
Self::DaycoreOsu(_) => DaycoreOsu::incompatible_mods().collect(),
Self::HardRockOsu(_) => HardRockOsu::incompatible_mods().collect(),
Self::SuddenDeathOsu(_) => SuddenDeathOsu::incompatible_mods().collect(),
Self::PerfectOsu(_) => PerfectOsu::incompatible_mods().collect(),
Self::DoubleTimeOsu(_) => DoubleTimeOsu::incompatible_mods().collect(),
Self::NightcoreOsu(_) => NightcoreOsu::incompatible_mods().collect(),
Self::HiddenOsu(_) => HiddenOsu::incompatible_mods().collect(),
Self::FlashlightOsu(_) => FlashlightOsu::incompatible_mods().collect(),
Self::BlindsOsu(_) => BlindsOsu::incompatible_mods().collect(),
Self::StrictTrackingOsu(_) => StrictTrackingOsu::incompatible_mods().collect(),
Self::AccuracyChallengeOsu(_) => AccuracyChallengeOsu::incompatible_mods().collect(),
Self::TargetPracticeOsu(_) => TargetPracticeOsu::incompatible_mods().collect(),
Self::DifficultyAdjustOsu(_) => DifficultyAdjustOsu::incompatible_mods().collect(),
Self::ClassicOsu(_) => ClassicOsu::incompatible_mods().collect(),
Self::RandomOsu(_) => RandomOsu::incompatible_mods().collect(),
Self::MirrorOsu(_) => MirrorOsu::incompatible_mods().collect(),
Self::AlternateOsu(_) => AlternateOsu::incompatible_mods().collect(),
Self::SingleTapOsu(_) => SingleTapOsu::incompatible_mods().collect(),
Self::AutoplayOsu(_) => AutoplayOsu::incompatible_mods().collect(),
Self::CinemaOsu(_) => CinemaOsu::incompatible_mods().collect(),
Self::RelaxOsu(_) => RelaxOsu::incompatible_mods().collect(),
Self::AutopilotOsu(_) => AutopilotOsu::incompatible_mods().collect(),
Self::SpunOutOsu(_) => SpunOutOsu::incompatible_mods().collect(),
Self::TransformOsu(_) => TransformOsu::incompatible_mods().collect(),
Self::WiggleOsu(_) => WiggleOsu::incompatible_mods().collect(),
Self::SpinInOsu(_) => SpinInOsu::incompatible_mods().collect(),
Self::GrowOsu(_) => GrowOsu::incompatible_mods().collect(),
Self::DeflateOsu(_) => DeflateOsu::incompatible_mods().collect(),
Self::WindUpOsu(_) => WindUpOsu::incompatible_mods().collect(),
Self::WindDownOsu(_) => WindDownOsu::incompatible_mods().collect(),
Self::TraceableOsu(_) => TraceableOsu::incompatible_mods().collect(),
Self::BarrelRollOsu(_) => BarrelRollOsu::incompatible_mods().collect(),
Self::ApproachDifferentOsu(_) => ApproachDifferentOsu::incompatible_mods().collect(),
Self::MutedOsu(_) => MutedOsu::incompatible_mods().collect(),
Self::NoScopeOsu(_) => NoScopeOsu::incompatible_mods().collect(),
Self::MagnetisedOsu(_) => MagnetisedOsu::incompatible_mods().collect(),
Self::RepelOsu(_) => RepelOsu::incompatible_mods().collect(),
Self::AdaptiveSpeedOsu(_) => AdaptiveSpeedOsu::incompatible_mods().collect(),
Self::FreezeFrameOsu(_) => FreezeFrameOsu::incompatible_mods().collect(),
Self::BubblesOsu(_) => BubblesOsu::incompatible_mods().collect(),
Self::SynesthesiaOsu(_) => SynesthesiaOsu::incompatible_mods().collect(),
Self::DepthOsu(_) => DepthOsu::incompatible_mods().collect(),
Self::TouchDeviceOsu(_) => TouchDeviceOsu::incompatible_mods().collect(),
Self::ScoreV2Osu(_) => ScoreV2Osu::incompatible_mods().collect(),
Self::EasyTaiko(_) => EasyTaiko::incompatible_mods().collect(),
Self::NoFailTaiko(_) => NoFailTaiko::incompatible_mods().collect(),
Self::HalfTimeTaiko(_) => HalfTimeTaiko::incompatible_mods().collect(),
Self::DaycoreTaiko(_) => DaycoreTaiko::incompatible_mods().collect(),
Self::HardRockTaiko(_) => HardRockTaiko::incompatible_mods().collect(),
Self::SuddenDeathTaiko(_) => SuddenDeathTaiko::incompatible_mods().collect(),
Self::PerfectTaiko(_) => PerfectTaiko::incompatible_mods().collect(),
Self::DoubleTimeTaiko(_) => DoubleTimeTaiko::incompatible_mods().collect(),
Self::NightcoreTaiko(_) => NightcoreTaiko::incompatible_mods().collect(),
Self::HiddenTaiko(_) => HiddenTaiko::incompatible_mods().collect(),
Self::FlashlightTaiko(_) => FlashlightTaiko::incompatible_mods().collect(),
Self::AccuracyChallengeTaiko(_) => {
AccuracyChallengeTaiko::incompatible_mods().collect()
}
Self::RandomTaiko(_) => RandomTaiko::incompatible_mods().collect(),
Self::DifficultyAdjustTaiko(_) => DifficultyAdjustTaiko::incompatible_mods().collect(),
Self::ClassicTaiko(_) => ClassicTaiko::incompatible_mods().collect(),
Self::SwapTaiko(_) => SwapTaiko::incompatible_mods().collect(),
Self::SingleTapTaiko(_) => SingleTapTaiko::incompatible_mods().collect(),
Self::ConstantSpeedTaiko(_) => ConstantSpeedTaiko::incompatible_mods().collect(),
Self::AutoplayTaiko(_) => AutoplayTaiko::incompatible_mods().collect(),
Self::CinemaTaiko(_) => CinemaTaiko::incompatible_mods().collect(),
Self::RelaxTaiko(_) => RelaxTaiko::incompatible_mods().collect(),
Self::WindUpTaiko(_) => WindUpTaiko::incompatible_mods().collect(),
Self::WindDownTaiko(_) => WindDownTaiko::incompatible_mods().collect(),
Self::MutedTaiko(_) => MutedTaiko::incompatible_mods().collect(),
Self::AdaptiveSpeedTaiko(_) => AdaptiveSpeedTaiko::incompatible_mods().collect(),
Self::ScoreV2Taiko(_) => ScoreV2Taiko::incompatible_mods().collect(),
Self::EasyCatch(_) => EasyCatch::incompatible_mods().collect(),
Self::NoFailCatch(_) => NoFailCatch::incompatible_mods().collect(),
Self::HalfTimeCatch(_) => HalfTimeCatch::incompatible_mods().collect(),
Self::DaycoreCatch(_) => DaycoreCatch::incompatible_mods().collect(),
Self::HardRockCatch(_) => HardRockCatch::incompatible_mods().collect(),
Self::SuddenDeathCatch(_) => SuddenDeathCatch::incompatible_mods().collect(),
Self::PerfectCatch(_) => PerfectCatch::incompatible_mods().collect(),
Self::DoubleTimeCatch(_) => DoubleTimeCatch::incompatible_mods().collect(),
Self::NightcoreCatch(_) => NightcoreCatch::incompatible_mods().collect(),
Self::HiddenCatch(_) => HiddenCatch::incompatible_mods().collect(),
Self::FlashlightCatch(_) => FlashlightCatch::incompatible_mods().collect(),
Self::AccuracyChallengeCatch(_) => {
AccuracyChallengeCatch::incompatible_mods().collect()
}
Self::DifficultyAdjustCatch(_) => DifficultyAdjustCatch::incompatible_mods().collect(),
Self::ClassicCatch(_) => ClassicCatch::incompatible_mods().collect(),
Self::MirrorCatch(_) => MirrorCatch::incompatible_mods().collect(),
Self::AutoplayCatch(_) => AutoplayCatch::incompatible_mods().collect(),
Self::CinemaCatch(_) => CinemaCatch::incompatible_mods().collect(),
Self::RelaxCatch(_) => RelaxCatch::incompatible_mods().collect(),
Self::WindUpCatch(_) => WindUpCatch::incompatible_mods().collect(),
Self::WindDownCatch(_) => WindDownCatch::incompatible_mods().collect(),
Self::FloatingFruitsCatch(_) => FloatingFruitsCatch::incompatible_mods().collect(),
Self::MutedCatch(_) => MutedCatch::incompatible_mods().collect(),
Self::NoScopeCatch(_) => NoScopeCatch::incompatible_mods().collect(),
Self::ScoreV2Catch(_) => ScoreV2Catch::incompatible_mods().collect(),
Self::EasyMania(_) => EasyMania::incompatible_mods().collect(),
Self::NoFailMania(_) => NoFailMania::incompatible_mods().collect(),
Self::HalfTimeMania(_) => HalfTimeMania::incompatible_mods().collect(),
Self::DaycoreMania(_) => DaycoreMania::incompatible_mods().collect(),
Self::NoReleaseMania(_) => NoReleaseMania::incompatible_mods().collect(),
Self::HardRockMania(_) => HardRockMania::incompatible_mods().collect(),
Self::SuddenDeathMania(_) => SuddenDeathMania::incompatible_mods().collect(),
Self::PerfectMania(_) => PerfectMania::incompatible_mods().collect(),
Self::DoubleTimeMania(_) => DoubleTimeMania::incompatible_mods().collect(),
Self::NightcoreMania(_) => NightcoreMania::incompatible_mods().collect(),
Self::FadeInMania(_) => FadeInMania::incompatible_mods().collect(),
Self::HiddenMania(_) => HiddenMania::incompatible_mods().collect(),
Self::CoverMania(_) => CoverMania::incompatible_mods().collect(),
Self::FlashlightMania(_) => FlashlightMania::incompatible_mods().collect(),
Self::AccuracyChallengeMania(_) => {
AccuracyChallengeMania::incompatible_mods().collect()
}
Self::RandomMania(_) => RandomMania::incompatible_mods().collect(),
Self::DualStagesMania(_) => DualStagesMania::incompatible_mods().collect(),
Self::MirrorMania(_) => MirrorMania::incompatible_mods().collect(),
Self::DifficultyAdjustMania(_) => DifficultyAdjustMania::incompatible_mods().collect(),
Self::ClassicMania(_) => ClassicMania::incompatible_mods().collect(),
Self::InvertMania(_) => InvertMania::incompatible_mods().collect(),
Self::ConstantSpeedMania(_) => ConstantSpeedMania::incompatible_mods().collect(),
Self::HoldOffMania(_) => HoldOffMania::incompatible_mods().collect(),
Self::OneKeyMania(_) => OneKeyMania::incompatible_mods().collect(),
Self::TwoKeysMania(_) => TwoKeysMania::incompatible_mods().collect(),
Self::ThreeKeysMania(_) => ThreeKeysMania::incompatible_mods().collect(),
Self::FourKeysMania(_) => FourKeysMania::incompatible_mods().collect(),
Self::FiveKeysMania(_) => FiveKeysMania::incompatible_mods().collect(),
Self::SixKeysMania(_) => SixKeysMania::incompatible_mods().collect(),
Self::SevenKeysMania(_) => SevenKeysMania::incompatible_mods().collect(),
Self::EightKeysMania(_) => EightKeysMania::incompatible_mods().collect(),
Self::NineKeysMania(_) => NineKeysMania::incompatible_mods().collect(),
Self::TenKeysMania(_) => TenKeysMania::incompatible_mods().collect(),
Self::AutoplayMania(_) => AutoplayMania::incompatible_mods().collect(),
Self::CinemaMania(_) => CinemaMania::incompatible_mods().collect(),
Self::WindUpMania(_) => WindUpMania::incompatible_mods().collect(),
Self::WindDownMania(_) => WindDownMania::incompatible_mods().collect(),
Self::MutedMania(_) => MutedMania::incompatible_mods().collect(),
Self::AdaptiveSpeedMania(_) => AdaptiveSpeedMania::incompatible_mods().collect(),
Self::ScoreV2Mania(_) => ScoreV2Mania::incompatible_mods().collect(),
_ => UnknownMod::incompatible_mods().collect(),
}
}
pub const fn description(&self) -> &'static str {
match self {
Self::EasyOsu(_) => EasyOsu::description(),
Self::NoFailOsu(_) => NoFailOsu::description(),
Self::HalfTimeOsu(_) => HalfTimeOsu::description(),
Self::DaycoreOsu(_) => DaycoreOsu::description(),
Self::HardRockOsu(_) => HardRockOsu::description(),
Self::SuddenDeathOsu(_) => SuddenDeathOsu::description(),
Self::PerfectOsu(_) => PerfectOsu::description(),
Self::DoubleTimeOsu(_) => DoubleTimeOsu::description(),
Self::NightcoreOsu(_) => NightcoreOsu::description(),
Self::HiddenOsu(_) => HiddenOsu::description(),
Self::FlashlightOsu(_) => FlashlightOsu::description(),
Self::BlindsOsu(_) => BlindsOsu::description(),
Self::StrictTrackingOsu(_) => StrictTrackingOsu::description(),
Self::AccuracyChallengeOsu(_) => AccuracyChallengeOsu::description(),
Self::TargetPracticeOsu(_) => TargetPracticeOsu::description(),
Self::DifficultyAdjustOsu(_) => DifficultyAdjustOsu::description(),
Self::ClassicOsu(_) => ClassicOsu::description(),
Self::RandomOsu(_) => RandomOsu::description(),
Self::MirrorOsu(_) => MirrorOsu::description(),
Self::AlternateOsu(_) => AlternateOsu::description(),
Self::SingleTapOsu(_) => SingleTapOsu::description(),
Self::AutoplayOsu(_) => AutoplayOsu::description(),
Self::CinemaOsu(_) => CinemaOsu::description(),
Self::RelaxOsu(_) => RelaxOsu::description(),
Self::AutopilotOsu(_) => AutopilotOsu::description(),
Self::SpunOutOsu(_) => SpunOutOsu::description(),
Self::TransformOsu(_) => TransformOsu::description(),
Self::WiggleOsu(_) => WiggleOsu::description(),
Self::SpinInOsu(_) => SpinInOsu::description(),
Self::GrowOsu(_) => GrowOsu::description(),
Self::DeflateOsu(_) => DeflateOsu::description(),
Self::WindUpOsu(_) => WindUpOsu::description(),
Self::WindDownOsu(_) => WindDownOsu::description(),
Self::TraceableOsu(_) => TraceableOsu::description(),
Self::BarrelRollOsu(_) => BarrelRollOsu::description(),
Self::ApproachDifferentOsu(_) => ApproachDifferentOsu::description(),
Self::MutedOsu(_) => MutedOsu::description(),
Self::NoScopeOsu(_) => NoScopeOsu::description(),
Self::MagnetisedOsu(_) => MagnetisedOsu::description(),
Self::RepelOsu(_) => RepelOsu::description(),
Self::AdaptiveSpeedOsu(_) => AdaptiveSpeedOsu::description(),
Self::FreezeFrameOsu(_) => FreezeFrameOsu::description(),
Self::BubblesOsu(_) => BubblesOsu::description(),
Self::SynesthesiaOsu(_) => SynesthesiaOsu::description(),
Self::DepthOsu(_) => DepthOsu::description(),
Self::TouchDeviceOsu(_) => TouchDeviceOsu::description(),
Self::ScoreV2Osu(_) => ScoreV2Osu::description(),
Self::EasyTaiko(_) => EasyTaiko::description(),
Self::NoFailTaiko(_) => NoFailTaiko::description(),
Self::HalfTimeTaiko(_) => HalfTimeTaiko::description(),
Self::DaycoreTaiko(_) => DaycoreTaiko::description(),
Self::HardRockTaiko(_) => HardRockTaiko::description(),
Self::SuddenDeathTaiko(_) => SuddenDeathTaiko::description(),
Self::PerfectTaiko(_) => PerfectTaiko::description(),
Self::DoubleTimeTaiko(_) => DoubleTimeTaiko::description(),
Self::NightcoreTaiko(_) => NightcoreTaiko::description(),
Self::HiddenTaiko(_) => HiddenTaiko::description(),
Self::FlashlightTaiko(_) => FlashlightTaiko::description(),
Self::AccuracyChallengeTaiko(_) => AccuracyChallengeTaiko::description(),
Self::RandomTaiko(_) => RandomTaiko::description(),
Self::DifficultyAdjustTaiko(_) => DifficultyAdjustTaiko::description(),
Self::ClassicTaiko(_) => ClassicTaiko::description(),
Self::SwapTaiko(_) => SwapTaiko::description(),
Self::SingleTapTaiko(_) => SingleTapTaiko::description(),
Self::ConstantSpeedTaiko(_) => ConstantSpeedTaiko::description(),
Self::AutoplayTaiko(_) => AutoplayTaiko::description(),
Self::CinemaTaiko(_) => CinemaTaiko::description(),
Self::RelaxTaiko(_) => RelaxTaiko::description(),
Self::WindUpTaiko(_) => WindUpTaiko::description(),
Self::WindDownTaiko(_) => WindDownTaiko::description(),
Self::MutedTaiko(_) => MutedTaiko::description(),
Self::AdaptiveSpeedTaiko(_) => AdaptiveSpeedTaiko::description(),
Self::ScoreV2Taiko(_) => ScoreV2Taiko::description(),
Self::EasyCatch(_) => EasyCatch::description(),
Self::NoFailCatch(_) => NoFailCatch::description(),
Self::HalfTimeCatch(_) => HalfTimeCatch::description(),
Self::DaycoreCatch(_) => DaycoreCatch::description(),
Self::HardRockCatch(_) => HardRockCatch::description(),
Self::SuddenDeathCatch(_) => SuddenDeathCatch::description(),
Self::PerfectCatch(_) => PerfectCatch::description(),
Self::DoubleTimeCatch(_) => DoubleTimeCatch::description(),
Self::NightcoreCatch(_) => NightcoreCatch::description(),
Self::HiddenCatch(_) => HiddenCatch::description(),
Self::FlashlightCatch(_) => FlashlightCatch::description(),
Self::AccuracyChallengeCatch(_) => AccuracyChallengeCatch::description(),
Self::DifficultyAdjustCatch(_) => DifficultyAdjustCatch::description(),
Self::ClassicCatch(_) => ClassicCatch::description(),
Self::MirrorCatch(_) => MirrorCatch::description(),
Self::AutoplayCatch(_) => AutoplayCatch::description(),
Self::CinemaCatch(_) => CinemaCatch::description(),
Self::RelaxCatch(_) => RelaxCatch::description(),
Self::WindUpCatch(_) => WindUpCatch::description(),
Self::WindDownCatch(_) => WindDownCatch::description(),
Self::FloatingFruitsCatch(_) => FloatingFruitsCatch::description(),
Self::MutedCatch(_) => MutedCatch::description(),
Self::NoScopeCatch(_) => NoScopeCatch::description(),
Self::ScoreV2Catch(_) => ScoreV2Catch::description(),
Self::EasyMania(_) => EasyMania::description(),
Self::NoFailMania(_) => NoFailMania::description(),
Self::HalfTimeMania(_) => HalfTimeMania::description(),
Self::DaycoreMania(_) => DaycoreMania::description(),
Self::NoReleaseMania(_) => NoReleaseMania::description(),
Self::HardRockMania(_) => HardRockMania::description(),
Self::SuddenDeathMania(_) => SuddenDeathMania::description(),
Self::PerfectMania(_) => PerfectMania::description(),
Self::DoubleTimeMania(_) => DoubleTimeMania::description(),
Self::NightcoreMania(_) => NightcoreMania::description(),
Self::FadeInMania(_) => FadeInMania::description(),
Self::HiddenMania(_) => HiddenMania::description(),
Self::CoverMania(_) => CoverMania::description(),
Self::FlashlightMania(_) => FlashlightMania::description(),
Self::AccuracyChallengeMania(_) => AccuracyChallengeMania::description(),
Self::RandomMania(_) => RandomMania::description(),
Self::DualStagesMania(_) => DualStagesMania::description(),
Self::MirrorMania(_) => MirrorMania::description(),
Self::DifficultyAdjustMania(_) => DifficultyAdjustMania::description(),
Self::ClassicMania(_) => ClassicMania::description(),
Self::InvertMania(_) => InvertMania::description(),
Self::ConstantSpeedMania(_) => ConstantSpeedMania::description(),
Self::HoldOffMania(_) => HoldOffMania::description(),
Self::OneKeyMania(_) => OneKeyMania::description(),
Self::TwoKeysMania(_) => TwoKeysMania::description(),
Self::ThreeKeysMania(_) => ThreeKeysMania::description(),
Self::FourKeysMania(_) => FourKeysMania::description(),
Self::FiveKeysMania(_) => FiveKeysMania::description(),
Self::SixKeysMania(_) => SixKeysMania::description(),
Self::SevenKeysMania(_) => SevenKeysMania::description(),
Self::EightKeysMania(_) => EightKeysMania::description(),
Self::NineKeysMania(_) => NineKeysMania::description(),
Self::TenKeysMania(_) => TenKeysMania::description(),
Self::AutoplayMania(_) => AutoplayMania::description(),
Self::CinemaMania(_) => CinemaMania::description(),
Self::WindUpMania(_) => WindUpMania::description(),
Self::WindDownMania(_) => WindDownMania::description(),
Self::MutedMania(_) => MutedMania::description(),
Self::AdaptiveSpeedMania(_) => AdaptiveSpeedMania::description(),
Self::ScoreV2Mania(_) => ScoreV2Mania::description(),
_ => UnknownMod::description(),
}
}
pub const fn kind(&self) -> GameModKind {
match self {
Self::EasyOsu(_) => EasyOsu::kind(),
Self::NoFailOsu(_) => NoFailOsu::kind(),
Self::HalfTimeOsu(_) => HalfTimeOsu::kind(),
Self::DaycoreOsu(_) => DaycoreOsu::kind(),
Self::HardRockOsu(_) => HardRockOsu::kind(),
Self::SuddenDeathOsu(_) => SuddenDeathOsu::kind(),
Self::PerfectOsu(_) => PerfectOsu::kind(),
Self::DoubleTimeOsu(_) => DoubleTimeOsu::kind(),
Self::NightcoreOsu(_) => NightcoreOsu::kind(),
Self::HiddenOsu(_) => HiddenOsu::kind(),
Self::FlashlightOsu(_) => FlashlightOsu::kind(),
Self::BlindsOsu(_) => BlindsOsu::kind(),
Self::StrictTrackingOsu(_) => StrictTrackingOsu::kind(),
Self::AccuracyChallengeOsu(_) => AccuracyChallengeOsu::kind(),
Self::TargetPracticeOsu(_) => TargetPracticeOsu::kind(),
Self::DifficultyAdjustOsu(_) => DifficultyAdjustOsu::kind(),
Self::ClassicOsu(_) => ClassicOsu::kind(),
Self::RandomOsu(_) => RandomOsu::kind(),
Self::MirrorOsu(_) => MirrorOsu::kind(),
Self::AlternateOsu(_) => AlternateOsu::kind(),
Self::SingleTapOsu(_) => SingleTapOsu::kind(),
Self::AutoplayOsu(_) => AutoplayOsu::kind(),
Self::CinemaOsu(_) => CinemaOsu::kind(),
Self::RelaxOsu(_) => RelaxOsu::kind(),
Self::AutopilotOsu(_) => AutopilotOsu::kind(),
Self::SpunOutOsu(_) => SpunOutOsu::kind(),
Self::TransformOsu(_) => TransformOsu::kind(),
Self::WiggleOsu(_) => WiggleOsu::kind(),
Self::SpinInOsu(_) => SpinInOsu::kind(),
Self::GrowOsu(_) => GrowOsu::kind(),
Self::DeflateOsu(_) => DeflateOsu::kind(),
Self::WindUpOsu(_) => WindUpOsu::kind(),
Self::WindDownOsu(_) => WindDownOsu::kind(),
Self::TraceableOsu(_) => TraceableOsu::kind(),
Self::BarrelRollOsu(_) => BarrelRollOsu::kind(),
Self::ApproachDifferentOsu(_) => ApproachDifferentOsu::kind(),
Self::MutedOsu(_) => MutedOsu::kind(),
Self::NoScopeOsu(_) => NoScopeOsu::kind(),
Self::MagnetisedOsu(_) => MagnetisedOsu::kind(),
Self::RepelOsu(_) => RepelOsu::kind(),
Self::AdaptiveSpeedOsu(_) => AdaptiveSpeedOsu::kind(),
Self::FreezeFrameOsu(_) => FreezeFrameOsu::kind(),
Self::BubblesOsu(_) => BubblesOsu::kind(),
Self::SynesthesiaOsu(_) => SynesthesiaOsu::kind(),
Self::DepthOsu(_) => DepthOsu::kind(),
Self::TouchDeviceOsu(_) => TouchDeviceOsu::kind(),
Self::ScoreV2Osu(_) => ScoreV2Osu::kind(),
Self::EasyTaiko(_) => EasyTaiko::kind(),
Self::NoFailTaiko(_) => NoFailTaiko::kind(),
Self::HalfTimeTaiko(_) => HalfTimeTaiko::kind(),
Self::DaycoreTaiko(_) => DaycoreTaiko::kind(),
Self::HardRockTaiko(_) => HardRockTaiko::kind(),
Self::SuddenDeathTaiko(_) => SuddenDeathTaiko::kind(),
Self::PerfectTaiko(_) => PerfectTaiko::kind(),
Self::DoubleTimeTaiko(_) => DoubleTimeTaiko::kind(),
Self::NightcoreTaiko(_) => NightcoreTaiko::kind(),
Self::HiddenTaiko(_) => HiddenTaiko::kind(),
Self::FlashlightTaiko(_) => FlashlightTaiko::kind(),
Self::AccuracyChallengeTaiko(_) => AccuracyChallengeTaiko::kind(),
Self::RandomTaiko(_) => RandomTaiko::kind(),
Self::DifficultyAdjustTaiko(_) => DifficultyAdjustTaiko::kind(),
Self::ClassicTaiko(_) => ClassicTaiko::kind(),
Self::SwapTaiko(_) => SwapTaiko::kind(),
Self::SingleTapTaiko(_) => SingleTapTaiko::kind(),
Self::ConstantSpeedTaiko(_) => ConstantSpeedTaiko::kind(),
Self::AutoplayTaiko(_) => AutoplayTaiko::kind(),
Self::CinemaTaiko(_) => CinemaTaiko::kind(),
Self::RelaxTaiko(_) => RelaxTaiko::kind(),
Self::WindUpTaiko(_) => WindUpTaiko::kind(),
Self::WindDownTaiko(_) => WindDownTaiko::kind(),
Self::MutedTaiko(_) => MutedTaiko::kind(),
Self::AdaptiveSpeedTaiko(_) => AdaptiveSpeedTaiko::kind(),
Self::ScoreV2Taiko(_) => ScoreV2Taiko::kind(),
Self::EasyCatch(_) => EasyCatch::kind(),
Self::NoFailCatch(_) => NoFailCatch::kind(),
Self::HalfTimeCatch(_) => HalfTimeCatch::kind(),
Self::DaycoreCatch(_) => DaycoreCatch::kind(),
Self::HardRockCatch(_) => HardRockCatch::kind(),
Self::SuddenDeathCatch(_) => SuddenDeathCatch::kind(),
Self::PerfectCatch(_) => PerfectCatch::kind(),
Self::DoubleTimeCatch(_) => DoubleTimeCatch::kind(),
Self::NightcoreCatch(_) => NightcoreCatch::kind(),
Self::HiddenCatch(_) => HiddenCatch::kind(),
Self::FlashlightCatch(_) => FlashlightCatch::kind(),
Self::AccuracyChallengeCatch(_) => AccuracyChallengeCatch::kind(),
Self::DifficultyAdjustCatch(_) => DifficultyAdjustCatch::kind(),
Self::ClassicCatch(_) => ClassicCatch::kind(),
Self::MirrorCatch(_) => MirrorCatch::kind(),
Self::AutoplayCatch(_) => AutoplayCatch::kind(),
Self::CinemaCatch(_) => CinemaCatch::kind(),
Self::RelaxCatch(_) => RelaxCatch::kind(),
Self::WindUpCatch(_) => WindUpCatch::kind(),
Self::WindDownCatch(_) => WindDownCatch::kind(),
Self::FloatingFruitsCatch(_) => FloatingFruitsCatch::kind(),
Self::MutedCatch(_) => MutedCatch::kind(),
Self::NoScopeCatch(_) => NoScopeCatch::kind(),
Self::ScoreV2Catch(_) => ScoreV2Catch::kind(),
Self::EasyMania(_) => EasyMania::kind(),
Self::NoFailMania(_) => NoFailMania::kind(),
Self::HalfTimeMania(_) => HalfTimeMania::kind(),
Self::DaycoreMania(_) => DaycoreMania::kind(),
Self::NoReleaseMania(_) => NoReleaseMania::kind(),
Self::HardRockMania(_) => HardRockMania::kind(),
Self::SuddenDeathMania(_) => SuddenDeathMania::kind(),
Self::PerfectMania(_) => PerfectMania::kind(),
Self::DoubleTimeMania(_) => DoubleTimeMania::kind(),
Self::NightcoreMania(_) => NightcoreMania::kind(),
Self::FadeInMania(_) => FadeInMania::kind(),
Self::HiddenMania(_) => HiddenMania::kind(),
Self::CoverMania(_) => CoverMania::kind(),
Self::FlashlightMania(_) => FlashlightMania::kind(),
Self::AccuracyChallengeMania(_) => AccuracyChallengeMania::kind(),
Self::RandomMania(_) => RandomMania::kind(),
Self::DualStagesMania(_) => DualStagesMania::kind(),
Self::MirrorMania(_) => MirrorMania::kind(),
Self::DifficultyAdjustMania(_) => DifficultyAdjustMania::kind(),
Self::ClassicMania(_) => ClassicMania::kind(),
Self::InvertMania(_) => InvertMania::kind(),
Self::ConstantSpeedMania(_) => ConstantSpeedMania::kind(),
Self::HoldOffMania(_) => HoldOffMania::kind(),
Self::OneKeyMania(_) => OneKeyMania::kind(),
Self::TwoKeysMania(_) => TwoKeysMania::kind(),
Self::ThreeKeysMania(_) => ThreeKeysMania::kind(),
Self::FourKeysMania(_) => FourKeysMania::kind(),
Self::FiveKeysMania(_) => FiveKeysMania::kind(),
Self::SixKeysMania(_) => SixKeysMania::kind(),
Self::SevenKeysMania(_) => SevenKeysMania::kind(),
Self::EightKeysMania(_) => EightKeysMania::kind(),
Self::NineKeysMania(_) => NineKeysMania::kind(),
Self::TenKeysMania(_) => TenKeysMania::kind(),
Self::AutoplayMania(_) => AutoplayMania::kind(),
Self::CinemaMania(_) => CinemaMania::kind(),
Self::WindUpMania(_) => WindUpMania::kind(),
Self::WindDownMania(_) => WindDownMania::kind(),
Self::MutedMania(_) => MutedMania::kind(),
Self::AdaptiveSpeedMania(_) => AdaptiveSpeedMania::kind(),
Self::ScoreV2Mania(_) => ScoreV2Mania::kind(),
_ => UnknownMod::kind(),
}
}
pub const fn bits(&self) -> Option<u32> {
match self {
Self::EasyOsu(_) => Some(EasyOsu::bits()),
Self::NoFailOsu(_) => Some(NoFailOsu::bits()),
Self::HalfTimeOsu(_) => Some(HalfTimeOsu::bits()),
Self::HardRockOsu(_) => Some(HardRockOsu::bits()),
Self::SuddenDeathOsu(_) => Some(SuddenDeathOsu::bits()),
Self::PerfectOsu(_) => Some(PerfectOsu::bits()),
Self::DoubleTimeOsu(_) => Some(DoubleTimeOsu::bits()),
Self::NightcoreOsu(_) => Some(NightcoreOsu::bits()),
Self::HiddenOsu(_) => Some(HiddenOsu::bits()),
Self::FlashlightOsu(_) => Some(FlashlightOsu::bits()),
Self::TargetPracticeOsu(_) => Some(TargetPracticeOsu::bits()),
Self::RandomOsu(_) => Some(RandomOsu::bits()),
Self::MirrorOsu(_) => Some(MirrorOsu::bits()),
Self::AutoplayOsu(_) => Some(AutoplayOsu::bits()),
Self::CinemaOsu(_) => Some(CinemaOsu::bits()),
Self::RelaxOsu(_) => Some(RelaxOsu::bits()),
Self::AutopilotOsu(_) => Some(AutopilotOsu::bits()),
Self::SpunOutOsu(_) => Some(SpunOutOsu::bits()),
Self::TouchDeviceOsu(_) => Some(TouchDeviceOsu::bits()),
Self::ScoreV2Osu(_) => Some(ScoreV2Osu::bits()),
Self::EasyTaiko(_) => Some(EasyTaiko::bits()),
Self::NoFailTaiko(_) => Some(NoFailTaiko::bits()),
Self::HalfTimeTaiko(_) => Some(HalfTimeTaiko::bits()),
Self::HardRockTaiko(_) => Some(HardRockTaiko::bits()),
Self::SuddenDeathTaiko(_) => Some(SuddenDeathTaiko::bits()),
Self::PerfectTaiko(_) => Some(PerfectTaiko::bits()),
Self::DoubleTimeTaiko(_) => Some(DoubleTimeTaiko::bits()),
Self::NightcoreTaiko(_) => Some(NightcoreTaiko::bits()),
Self::HiddenTaiko(_) => Some(HiddenTaiko::bits()),
Self::FlashlightTaiko(_) => Some(FlashlightTaiko::bits()),
Self::RandomTaiko(_) => Some(RandomTaiko::bits()),
Self::AutoplayTaiko(_) => Some(AutoplayTaiko::bits()),
Self::CinemaTaiko(_) => Some(CinemaTaiko::bits()),
Self::RelaxTaiko(_) => Some(RelaxTaiko::bits()),
Self::ScoreV2Taiko(_) => Some(ScoreV2Taiko::bits()),
Self::EasyCatch(_) => Some(EasyCatch::bits()),
Self::NoFailCatch(_) => Some(NoFailCatch::bits()),
Self::HalfTimeCatch(_) => Some(HalfTimeCatch::bits()),
Self::HardRockCatch(_) => Some(HardRockCatch::bits()),
Self::SuddenDeathCatch(_) => Some(SuddenDeathCatch::bits()),
Self::PerfectCatch(_) => Some(PerfectCatch::bits()),
Self::DoubleTimeCatch(_) => Some(DoubleTimeCatch::bits()),
Self::NightcoreCatch(_) => Some(NightcoreCatch::bits()),
Self::HiddenCatch(_) => Some(HiddenCatch::bits()),
Self::FlashlightCatch(_) => Some(FlashlightCatch::bits()),
Self::MirrorCatch(_) => Some(MirrorCatch::bits()),
Self::AutoplayCatch(_) => Some(AutoplayCatch::bits()),
Self::CinemaCatch(_) => Some(CinemaCatch::bits()),
Self::RelaxCatch(_) => Some(RelaxCatch::bits()),
Self::ScoreV2Catch(_) => Some(ScoreV2Catch::bits()),
Self::EasyMania(_) => Some(EasyMania::bits()),
Self::NoFailMania(_) => Some(NoFailMania::bits()),
Self::HalfTimeMania(_) => Some(HalfTimeMania::bits()),
Self::HardRockMania(_) => Some(HardRockMania::bits()),
Self::SuddenDeathMania(_) => Some(SuddenDeathMania::bits()),
Self::PerfectMania(_) => Some(PerfectMania::bits()),
Self::DoubleTimeMania(_) => Some(DoubleTimeMania::bits()),
Self::NightcoreMania(_) => Some(NightcoreMania::bits()),
Self::FadeInMania(_) => Some(FadeInMania::bits()),
Self::HiddenMania(_) => Some(HiddenMania::bits()),
Self::FlashlightMania(_) => Some(FlashlightMania::bits()),
Self::RandomMania(_) => Some(RandomMania::bits()),
Self::DualStagesMania(_) => Some(DualStagesMania::bits()),
Self::MirrorMania(_) => Some(MirrorMania::bits()),
Self::OneKeyMania(_) => Some(OneKeyMania::bits()),
Self::TwoKeysMania(_) => Some(TwoKeysMania::bits()),
Self::ThreeKeysMania(_) => Some(ThreeKeysMania::bits()),
Self::FourKeysMania(_) => Some(FourKeysMania::bits()),
Self::FiveKeysMania(_) => Some(FiveKeysMania::bits()),
Self::SixKeysMania(_) => Some(SixKeysMania::bits()),
Self::SevenKeysMania(_) => Some(SevenKeysMania::bits()),
Self::EightKeysMania(_) => Some(EightKeysMania::bits()),
Self::NineKeysMania(_) => Some(NineKeysMania::bits()),
Self::AutoplayMania(_) => Some(AutoplayMania::bits()),
Self::CinemaMania(_) => Some(CinemaMania::bits()),
Self::ScoreV2Mania(_) => Some(ScoreV2Mania::bits()),
_ => None,
}
}
pub const fn mode(&self) -> GameMode {
match self {
Self::EasyOsu(_)
| Self::NoFailOsu(_)
| Self::HalfTimeOsu(_)
| Self::DaycoreOsu(_)
| Self::HardRockOsu(_)
| Self::SuddenDeathOsu(_)
| Self::PerfectOsu(_)
| Self::DoubleTimeOsu(_)
| Self::NightcoreOsu(_)
| Self::HiddenOsu(_)
| Self::FlashlightOsu(_)
| Self::BlindsOsu(_)
| Self::StrictTrackingOsu(_)
| Self::AccuracyChallengeOsu(_)
| Self::TargetPracticeOsu(_)
| Self::DifficultyAdjustOsu(_)
| Self::ClassicOsu(_)
| Self::RandomOsu(_)
| Self::MirrorOsu(_)
| Self::AlternateOsu(_)
| Self::SingleTapOsu(_)
| Self::AutoplayOsu(_)
| Self::CinemaOsu(_)
| Self::RelaxOsu(_)
| Self::AutopilotOsu(_)
| Self::SpunOutOsu(_)
| Self::TransformOsu(_)
| Self::WiggleOsu(_)
| Self::SpinInOsu(_)
| Self::GrowOsu(_)
| Self::DeflateOsu(_)
| Self::WindUpOsu(_)
| Self::WindDownOsu(_)
| Self::TraceableOsu(_)
| Self::BarrelRollOsu(_)
| Self::ApproachDifferentOsu(_)
| Self::MutedOsu(_)
| Self::NoScopeOsu(_)
| Self::MagnetisedOsu(_)
| Self::RepelOsu(_)
| Self::AdaptiveSpeedOsu(_)
| Self::FreezeFrameOsu(_)
| Self::BubblesOsu(_)
| Self::SynesthesiaOsu(_)
| Self::DepthOsu(_)
| Self::TouchDeviceOsu(_)
| Self::ScoreV2Osu(_)
| Self::UnknownOsu(_) => GameMode::Osu,
Self::EasyTaiko(_)
| Self::NoFailTaiko(_)
| Self::HalfTimeTaiko(_)
| Self::DaycoreTaiko(_)
| Self::HardRockTaiko(_)
| Self::SuddenDeathTaiko(_)
| Self::PerfectTaiko(_)
| Self::DoubleTimeTaiko(_)
| Self::NightcoreTaiko(_)
| Self::HiddenTaiko(_)
| Self::FlashlightTaiko(_)
| Self::AccuracyChallengeTaiko(_)
| Self::RandomTaiko(_)
| Self::DifficultyAdjustTaiko(_)
| Self::ClassicTaiko(_)
| Self::SwapTaiko(_)
| Self::SingleTapTaiko(_)
| Self::ConstantSpeedTaiko(_)
| Self::AutoplayTaiko(_)
| Self::CinemaTaiko(_)
| Self::RelaxTaiko(_)
| Self::WindUpTaiko(_)
| Self::WindDownTaiko(_)
| Self::MutedTaiko(_)
| Self::AdaptiveSpeedTaiko(_)
| Self::ScoreV2Taiko(_)
| Self::UnknownTaiko(_) => GameMode::Taiko,
Self::EasyCatch(_)
| Self::NoFailCatch(_)
| Self::HalfTimeCatch(_)
| Self::DaycoreCatch(_)
| Self::HardRockCatch(_)
| Self::SuddenDeathCatch(_)
| Self::PerfectCatch(_)
| Self::DoubleTimeCatch(_)
| Self::NightcoreCatch(_)
| Self::HiddenCatch(_)
| Self::FlashlightCatch(_)
| Self::AccuracyChallengeCatch(_)
| Self::DifficultyAdjustCatch(_)
| Self::ClassicCatch(_)
| Self::MirrorCatch(_)
| Self::AutoplayCatch(_)
| Self::CinemaCatch(_)
| Self::RelaxCatch(_)
| Self::WindUpCatch(_)
| Self::WindDownCatch(_)
| Self::FloatingFruitsCatch(_)
| Self::MutedCatch(_)
| Self::NoScopeCatch(_)
| Self::ScoreV2Catch(_)
| Self::UnknownCatch(_) => GameMode::Catch,
Self::EasyMania(_)
| Self::NoFailMania(_)
| Self::HalfTimeMania(_)
| Self::DaycoreMania(_)
| Self::NoReleaseMania(_)
| Self::HardRockMania(_)
| Self::SuddenDeathMania(_)
| Self::PerfectMania(_)
| Self::DoubleTimeMania(_)
| Self::NightcoreMania(_)
| Self::FadeInMania(_)
| Self::HiddenMania(_)
| Self::CoverMania(_)
| Self::FlashlightMania(_)
| Self::AccuracyChallengeMania(_)
| Self::RandomMania(_)
| Self::DualStagesMania(_)
| Self::MirrorMania(_)
| Self::DifficultyAdjustMania(_)
| Self::ClassicMania(_)
| Self::InvertMania(_)
| Self::ConstantSpeedMania(_)
| Self::HoldOffMania(_)
| Self::OneKeyMania(_)
| Self::TwoKeysMania(_)
| Self::ThreeKeysMania(_)
| Self::FourKeysMania(_)
| Self::FiveKeysMania(_)
| Self::SixKeysMania(_)
| Self::SevenKeysMania(_)
| Self::EightKeysMania(_)
| Self::NineKeysMania(_)
| Self::TenKeysMania(_)
| Self::AutoplayMania(_)
| Self::CinemaMania(_)
| Self::WindUpMania(_)
| Self::WindDownMania(_)
| Self::MutedMania(_)
| Self::AdaptiveSpeedMania(_)
| Self::ScoreV2Mania(_)
| Self::UnknownMania(_) => GameMode::Mania,
}
}
pub const fn intermode(&self) -> GameModIntermode {
match self {
Self::EasyOsu(_) => GameModIntermode::Easy,
Self::NoFailOsu(_) => GameModIntermode::NoFail,
Self::HalfTimeOsu(_) => GameModIntermode::HalfTime,
Self::DaycoreOsu(_) => GameModIntermode::Daycore,
Self::HardRockOsu(_) => GameModIntermode::HardRock,
Self::SuddenDeathOsu(_) => GameModIntermode::SuddenDeath,
Self::PerfectOsu(_) => GameModIntermode::Perfect,
Self::DoubleTimeOsu(_) => GameModIntermode::DoubleTime,
Self::NightcoreOsu(_) => GameModIntermode::Nightcore,
Self::HiddenOsu(_) => GameModIntermode::Hidden,
Self::FlashlightOsu(_) => GameModIntermode::Flashlight,
Self::BlindsOsu(_) => GameModIntermode::Blinds,
Self::StrictTrackingOsu(_) => GameModIntermode::StrictTracking,
Self::AccuracyChallengeOsu(_) => GameModIntermode::AccuracyChallenge,
Self::TargetPracticeOsu(_) => GameModIntermode::TargetPractice,
Self::DifficultyAdjustOsu(_) => GameModIntermode::DifficultyAdjust,
Self::ClassicOsu(_) => GameModIntermode::Classic,
Self::RandomOsu(_) => GameModIntermode::Random,
Self::MirrorOsu(_) => GameModIntermode::Mirror,
Self::AlternateOsu(_) => GameModIntermode::Alternate,
Self::SingleTapOsu(_) => GameModIntermode::SingleTap,
Self::AutoplayOsu(_) => GameModIntermode::Autoplay,
Self::CinemaOsu(_) => GameModIntermode::Cinema,
Self::RelaxOsu(_) => GameModIntermode::Relax,
Self::AutopilotOsu(_) => GameModIntermode::Autopilot,
Self::SpunOutOsu(_) => GameModIntermode::SpunOut,
Self::TransformOsu(_) => GameModIntermode::Transform,
Self::WiggleOsu(_) => GameModIntermode::Wiggle,
Self::SpinInOsu(_) => GameModIntermode::SpinIn,
Self::GrowOsu(_) => GameModIntermode::Grow,
Self::DeflateOsu(_) => GameModIntermode::Deflate,
Self::WindUpOsu(_) => GameModIntermode::WindUp,
Self::WindDownOsu(_) => GameModIntermode::WindDown,
Self::TraceableOsu(_) => GameModIntermode::Traceable,
Self::BarrelRollOsu(_) => GameModIntermode::BarrelRoll,
Self::ApproachDifferentOsu(_) => GameModIntermode::ApproachDifferent,
Self::MutedOsu(_) => GameModIntermode::Muted,
Self::NoScopeOsu(_) => GameModIntermode::NoScope,
Self::MagnetisedOsu(_) => GameModIntermode::Magnetised,
Self::RepelOsu(_) => GameModIntermode::Repel,
Self::AdaptiveSpeedOsu(_) => GameModIntermode::AdaptiveSpeed,
Self::FreezeFrameOsu(_) => GameModIntermode::FreezeFrame,
Self::BubblesOsu(_) => GameModIntermode::Bubbles,
Self::SynesthesiaOsu(_) => GameModIntermode::Synesthesia,
Self::DepthOsu(_) => GameModIntermode::Depth,
Self::TouchDeviceOsu(_) => GameModIntermode::TouchDevice,
Self::ScoreV2Osu(_) => GameModIntermode::ScoreV2,
Self::EasyTaiko(_) => GameModIntermode::Easy,
Self::NoFailTaiko(_) => GameModIntermode::NoFail,
Self::HalfTimeTaiko(_) => GameModIntermode::HalfTime,
Self::DaycoreTaiko(_) => GameModIntermode::Daycore,
Self::HardRockTaiko(_) => GameModIntermode::HardRock,
Self::SuddenDeathTaiko(_) => GameModIntermode::SuddenDeath,
Self::PerfectTaiko(_) => GameModIntermode::Perfect,
Self::DoubleTimeTaiko(_) => GameModIntermode::DoubleTime,
Self::NightcoreTaiko(_) => GameModIntermode::Nightcore,
Self::HiddenTaiko(_) => GameModIntermode::Hidden,
Self::FlashlightTaiko(_) => GameModIntermode::Flashlight,
Self::AccuracyChallengeTaiko(_) => GameModIntermode::AccuracyChallenge,
Self::RandomTaiko(_) => GameModIntermode::Random,
Self::DifficultyAdjustTaiko(_) => GameModIntermode::DifficultyAdjust,
Self::ClassicTaiko(_) => GameModIntermode::Classic,
Self::SwapTaiko(_) => GameModIntermode::Swap,
Self::SingleTapTaiko(_) => GameModIntermode::SingleTap,
Self::ConstantSpeedTaiko(_) => GameModIntermode::ConstantSpeed,
Self::AutoplayTaiko(_) => GameModIntermode::Autoplay,
Self::CinemaTaiko(_) => GameModIntermode::Cinema,
Self::RelaxTaiko(_) => GameModIntermode::Relax,
Self::WindUpTaiko(_) => GameModIntermode::WindUp,
Self::WindDownTaiko(_) => GameModIntermode::WindDown,
Self::MutedTaiko(_) => GameModIntermode::Muted,
Self::AdaptiveSpeedTaiko(_) => GameModIntermode::AdaptiveSpeed,
Self::ScoreV2Taiko(_) => GameModIntermode::ScoreV2,
Self::EasyCatch(_) => GameModIntermode::Easy,
Self::NoFailCatch(_) => GameModIntermode::NoFail,
Self::HalfTimeCatch(_) => GameModIntermode::HalfTime,
Self::DaycoreCatch(_) => GameModIntermode::Daycore,
Self::HardRockCatch(_) => GameModIntermode::HardRock,
Self::SuddenDeathCatch(_) => GameModIntermode::SuddenDeath,
Self::PerfectCatch(_) => GameModIntermode::Perfect,
Self::DoubleTimeCatch(_) => GameModIntermode::DoubleTime,
Self::NightcoreCatch(_) => GameModIntermode::Nightcore,
Self::HiddenCatch(_) => GameModIntermode::Hidden,
Self::FlashlightCatch(_) => GameModIntermode::Flashlight,
Self::AccuracyChallengeCatch(_) => GameModIntermode::AccuracyChallenge,
Self::DifficultyAdjustCatch(_) => GameModIntermode::DifficultyAdjust,
Self::ClassicCatch(_) => GameModIntermode::Classic,
Self::MirrorCatch(_) => GameModIntermode::Mirror,
Self::AutoplayCatch(_) => GameModIntermode::Autoplay,
Self::CinemaCatch(_) => GameModIntermode::Cinema,
Self::RelaxCatch(_) => GameModIntermode::Relax,
Self::WindUpCatch(_) => GameModIntermode::WindUp,
Self::WindDownCatch(_) => GameModIntermode::WindDown,
Self::FloatingFruitsCatch(_) => GameModIntermode::FloatingFruits,
Self::MutedCatch(_) => GameModIntermode::Muted,
Self::NoScopeCatch(_) => GameModIntermode::NoScope,
Self::ScoreV2Catch(_) => GameModIntermode::ScoreV2,
Self::EasyMania(_) => GameModIntermode::Easy,
Self::NoFailMania(_) => GameModIntermode::NoFail,
Self::HalfTimeMania(_) => GameModIntermode::HalfTime,
Self::DaycoreMania(_) => GameModIntermode::Daycore,
Self::NoReleaseMania(_) => GameModIntermode::NoRelease,
Self::HardRockMania(_) => GameModIntermode::HardRock,
Self::SuddenDeathMania(_) => GameModIntermode::SuddenDeath,
Self::PerfectMania(_) => GameModIntermode::Perfect,
Self::DoubleTimeMania(_) => GameModIntermode::DoubleTime,
Self::NightcoreMania(_) => GameModIntermode::Nightcore,
Self::FadeInMania(_) => GameModIntermode::FadeIn,
Self::HiddenMania(_) => GameModIntermode::Hidden,
Self::CoverMania(_) => GameModIntermode::Cover,
Self::FlashlightMania(_) => GameModIntermode::Flashlight,
Self::AccuracyChallengeMania(_) => GameModIntermode::AccuracyChallenge,
Self::RandomMania(_) => GameModIntermode::Random,
Self::DualStagesMania(_) => GameModIntermode::DualStages,
Self::MirrorMania(_) => GameModIntermode::Mirror,
Self::DifficultyAdjustMania(_) => GameModIntermode::DifficultyAdjust,
Self::ClassicMania(_) => GameModIntermode::Classic,
Self::InvertMania(_) => GameModIntermode::Invert,
Self::ConstantSpeedMania(_) => GameModIntermode::ConstantSpeed,
Self::HoldOffMania(_) => GameModIntermode::HoldOff,
Self::OneKeyMania(_) => GameModIntermode::OneKey,
Self::TwoKeysMania(_) => GameModIntermode::TwoKeys,
Self::ThreeKeysMania(_) => GameModIntermode::ThreeKeys,
Self::FourKeysMania(_) => GameModIntermode::FourKeys,
Self::FiveKeysMania(_) => GameModIntermode::FiveKeys,
Self::SixKeysMania(_) => GameModIntermode::SixKeys,
Self::SevenKeysMania(_) => GameModIntermode::SevenKeys,
Self::EightKeysMania(_) => GameModIntermode::EightKeys,
Self::NineKeysMania(_) => GameModIntermode::NineKeys,
Self::TenKeysMania(_) => GameModIntermode::TenKeys,
Self::AutoplayMania(_) => GameModIntermode::Autoplay,
Self::CinemaMania(_) => GameModIntermode::Cinema,
Self::WindUpMania(_) => GameModIntermode::WindUp,
Self::WindDownMania(_) => GameModIntermode::WindDown,
Self::MutedMania(_) => GameModIntermode::Muted,
Self::AdaptiveSpeedMania(_) => GameModIntermode::AdaptiveSpeed,
Self::ScoreV2Mania(_) => GameModIntermode::ScoreV2,
Self::UnknownOsu(m)
| Self::UnknownTaiko(m)
| Self::UnknownCatch(m)
| Self::UnknownMania(m) => GameModIntermode::Unknown(*m),
}
}
}
impl PartialOrd for GameMod {
fn partial_cmp(&self, other: &Self) -> Option<Ordering> {
self.bits()
.zip(other.bits())
.map(|(self_bits, other_bits)| self_bits.cmp(&other_bits))
}
}
#[cfg(feature = "serde")]
#[cfg_attr(all(docsrs, not(doctest)), doc(cfg(feature = "serde")))]
const _: () = {
use serde::{
de::{
value::MapAccessDeserializer, Deserializer, Error as DeError, IgnoredAny, MapAccess,
Visitor,
},
ser::{Serialize, SerializeMap, Serializer},
Deserialize,
};
use crate::serde::{GameModRaw, GameModSettings, GameModSettingsSeed, MaybeOwnedStr};
impl<'de> Deserialize<'de> for EasyOsu {
fn deserialize<D: Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct EasyOsuVisitor;
impl<'de> Visitor<'de> for EasyOsuVisitor {
type Value = EasyOsu;
fn expecting(&self, f: &mut Formatter<'_>) -> FmtResult {
f.write_str("EasyOsu")
}
fn visit_map<A: MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
const FIELDS: &'static [&'static str] = &["retries"];
let mut retries = None;
while let Some(key) = map.next_key::<MaybeOwnedStr<'de>>()? {
match key.as_str() {
"retries" => retries = Some(map.next_value()?),
_ => return Err(DeError::unknown_field(key.as_str(), FIELDS)),
}
}
Ok(Self::Value {
retries: retries.unwrap_or_default(),
})
}
}
d.deserialize_map(EasyOsuVisitor)
}
}
impl Serialize for EasyOsu {
fn serialize<S: Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
let field_count = self.retries.is_some() as usize;
let mut map = s.serialize_map(Some(field_count))?;
if let Some(ref x) = self.retries {
map.serialize_entry("retries", x)?;
}
map.end()
}
}
impl<'de> Deserialize<'de> for NoFailOsu {
fn deserialize<D: Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct NoFailOsuVisitor;
impl<'de> Visitor<'de> for NoFailOsuVisitor {
type Value = NoFailOsu;
fn expecting(&self, f: &mut Formatter<'_>) -> FmtResult {
f.write_str("NoFailOsu")
}
fn visit_map<A: MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
const FIELDS: &'static [&'static str] = &[];
while let Some(key) = map.next_key::<MaybeOwnedStr<'de>>()? {
match key.as_str() {
_ => return Err(DeError::unknown_field(key.as_str(), FIELDS)),
}
}
Ok(Self::Value {})
}
}
d.deserialize_map(NoFailOsuVisitor)
}
}
impl Serialize for NoFailOsu {
fn serialize<S: Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
let field_count = 0;
let map = s.serialize_map(Some(field_count))?;
map.end()
}
}
impl<'de> Deserialize<'de> for HalfTimeOsu {
fn deserialize<D: Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct HalfTimeOsuVisitor;
impl<'de> Visitor<'de> for HalfTimeOsuVisitor {
type Value = HalfTimeOsu;
fn expecting(&self, f: &mut Formatter<'_>) -> FmtResult {
f.write_str("HalfTimeOsu")
}
fn visit_map<A: MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
const FIELDS: &'static [&'static str] = &["speed_change", "adjust_pitch"];
let mut speed_change = None;
let mut adjust_pitch = None;
while let Some(key) = map.next_key::<MaybeOwnedStr<'de>>()? {
match key.as_str() {
"speed_change" => speed_change = Some(map.next_value()?),
"adjust_pitch" => adjust_pitch = Some(map.next_value()?),
_ => return Err(DeError::unknown_field(key.as_str(), FIELDS)),
}
}
Ok(Self::Value {
speed_change: speed_change.unwrap_or_default(),
adjust_pitch: adjust_pitch.unwrap_or_default(),
})
}
}
d.deserialize_map(HalfTimeOsuVisitor)
}
}
impl Serialize for HalfTimeOsu {
fn serialize<S: Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
let field_count =
self.speed_change.is_some() as usize + self.adjust_pitch.is_some() as usize;
let mut map = s.serialize_map(Some(field_count))?;
if let Some(ref x) = self.speed_change {
map.serialize_entry("speed_change", x)?;
}
if let Some(ref x) = self.adjust_pitch {
map.serialize_entry("adjust_pitch", x)?;
}
map.end()
}
}
impl<'de> Deserialize<'de> for DaycoreOsu {
fn deserialize<D: Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct DaycoreOsuVisitor;
impl<'de> Visitor<'de> for DaycoreOsuVisitor {
type Value = DaycoreOsu;
fn expecting(&self, f: &mut Formatter<'_>) -> FmtResult {
f.write_str("DaycoreOsu")
}
fn visit_map<A: MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
const FIELDS: &'static [&'static str] = &["speed_change"];
let mut speed_change = None;
while let Some(key) = map.next_key::<MaybeOwnedStr<'de>>()? {
match key.as_str() {
"speed_change" => speed_change = Some(map.next_value()?),
_ => return Err(DeError::unknown_field(key.as_str(), FIELDS)),
}
}
Ok(Self::Value {
speed_change: speed_change.unwrap_or_default(),
})
}
}
d.deserialize_map(DaycoreOsuVisitor)
}
}
impl Serialize for DaycoreOsu {
fn serialize<S: Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
let field_count = self.speed_change.is_some() as usize;
let mut map = s.serialize_map(Some(field_count))?;
if let Some(ref x) = self.speed_change {
map.serialize_entry("speed_change", x)?;
}
map.end()
}
}
impl<'de> Deserialize<'de> for HardRockOsu {
fn deserialize<D: Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct HardRockOsuVisitor;
impl<'de> Visitor<'de> for HardRockOsuVisitor {
type Value = HardRockOsu;
fn expecting(&self, f: &mut Formatter<'_>) -> FmtResult {
f.write_str("HardRockOsu")
}
fn visit_map<A: MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
const FIELDS: &'static [&'static str] = &[];
while let Some(key) = map.next_key::<MaybeOwnedStr<'de>>()? {
match key.as_str() {
_ => return Err(DeError::unknown_field(key.as_str(), FIELDS)),
}
}
Ok(Self::Value {})
}
}
d.deserialize_map(HardRockOsuVisitor)
}
}
impl Serialize for HardRockOsu {
fn serialize<S: Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
let field_count = 0;
let map = s.serialize_map(Some(field_count))?;
map.end()
}
}
impl<'de> Deserialize<'de> for SuddenDeathOsu {
fn deserialize<D: Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct SuddenDeathOsuVisitor;
impl<'de> Visitor<'de> for SuddenDeathOsuVisitor {
type Value = SuddenDeathOsu;
fn expecting(&self, f: &mut Formatter<'_>) -> FmtResult {
f.write_str("SuddenDeathOsu")
}
fn visit_map<A: MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
const FIELDS: &'static [&'static str] = &["restart"];
let mut restart = None;
while let Some(key) = map.next_key::<MaybeOwnedStr<'de>>()? {
match key.as_str() {
"restart" => restart = Some(map.next_value()?),
_ => return Err(DeError::unknown_field(key.as_str(), FIELDS)),
}
}
Ok(Self::Value {
restart: restart.unwrap_or_default(),
})
}
}
d.deserialize_map(SuddenDeathOsuVisitor)
}
}
impl Serialize for SuddenDeathOsu {
fn serialize<S: Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
let field_count = self.restart.is_some() as usize;
let mut map = s.serialize_map(Some(field_count))?;
if let Some(ref x) = self.restart {
map.serialize_entry("restart", x)?;
}
map.end()
}
}
impl<'de> Deserialize<'de> for PerfectOsu {
fn deserialize<D: Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct PerfectOsuVisitor;
impl<'de> Visitor<'de> for PerfectOsuVisitor {
type Value = PerfectOsu;
fn expecting(&self, f: &mut Formatter<'_>) -> FmtResult {
f.write_str("PerfectOsu")
}
fn visit_map<A: MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
const FIELDS: &'static [&'static str] = &["restart"];
let mut restart = None;
while let Some(key) = map.next_key::<MaybeOwnedStr<'de>>()? {
match key.as_str() {
"restart" => restart = Some(map.next_value()?),
_ => return Err(DeError::unknown_field(key.as_str(), FIELDS)),
}
}
Ok(Self::Value {
restart: restart.unwrap_or_default(),
})
}
}
d.deserialize_map(PerfectOsuVisitor)
}
}
impl Serialize for PerfectOsu {
fn serialize<S: Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
let field_count = self.restart.is_some() as usize;
let mut map = s.serialize_map(Some(field_count))?;
if let Some(ref x) = self.restart {
map.serialize_entry("restart", x)?;
}
map.end()
}
}
impl<'de> Deserialize<'de> for DoubleTimeOsu {
fn deserialize<D: Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct DoubleTimeOsuVisitor;
impl<'de> Visitor<'de> for DoubleTimeOsuVisitor {
type Value = DoubleTimeOsu;
fn expecting(&self, f: &mut Formatter<'_>) -> FmtResult {
f.write_str("DoubleTimeOsu")
}
fn visit_map<A: MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
const FIELDS: &'static [&'static str] = &["speed_change", "adjust_pitch"];
let mut speed_change = None;
let mut adjust_pitch = None;
while let Some(key) = map.next_key::<MaybeOwnedStr<'de>>()? {
match key.as_str() {
"speed_change" => speed_change = Some(map.next_value()?),
"adjust_pitch" => adjust_pitch = Some(map.next_value()?),
_ => return Err(DeError::unknown_field(key.as_str(), FIELDS)),
}
}
Ok(Self::Value {
speed_change: speed_change.unwrap_or_default(),
adjust_pitch: adjust_pitch.unwrap_or_default(),
})
}
}
d.deserialize_map(DoubleTimeOsuVisitor)
}
}
impl Serialize for DoubleTimeOsu {
fn serialize<S: Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
let field_count =
self.speed_change.is_some() as usize + self.adjust_pitch.is_some() as usize;
let mut map = s.serialize_map(Some(field_count))?;
if let Some(ref x) = self.speed_change {
map.serialize_entry("speed_change", x)?;
}
if let Some(ref x) = self.adjust_pitch {
map.serialize_entry("adjust_pitch", x)?;
}
map.end()
}
}
impl<'de> Deserialize<'de> for NightcoreOsu {
fn deserialize<D: Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct NightcoreOsuVisitor;
impl<'de> Visitor<'de> for NightcoreOsuVisitor {
type Value = NightcoreOsu;
fn expecting(&self, f: &mut Formatter<'_>) -> FmtResult {
f.write_str("NightcoreOsu")
}
fn visit_map<A: MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
const FIELDS: &'static [&'static str] = &["speed_change"];
let mut speed_change = None;
while let Some(key) = map.next_key::<MaybeOwnedStr<'de>>()? {
match key.as_str() {
"speed_change" => speed_change = Some(map.next_value()?),
_ => return Err(DeError::unknown_field(key.as_str(), FIELDS)),
}
}
Ok(Self::Value {
speed_change: speed_change.unwrap_or_default(),
})
}
}
d.deserialize_map(NightcoreOsuVisitor)
}
}
impl Serialize for NightcoreOsu {
fn serialize<S: Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
let field_count = self.speed_change.is_some() as usize;
let mut map = s.serialize_map(Some(field_count))?;
if let Some(ref x) = self.speed_change {
map.serialize_entry("speed_change", x)?;
}
map.end()
}
}
impl<'de> Deserialize<'de> for HiddenOsu {
fn deserialize<D: Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct HiddenOsuVisitor;
impl<'de> Visitor<'de> for HiddenOsuVisitor {
type Value = HiddenOsu;
fn expecting(&self, f: &mut Formatter<'_>) -> FmtResult {
f.write_str("HiddenOsu")
}
fn visit_map<A: MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
const FIELDS: &'static [&'static str] = &["only_fade_approach_circles"];
let mut only_fade_approach_circles = None;
while let Some(key) = map.next_key::<MaybeOwnedStr<'de>>()? {
match key.as_str() {
"only_fade_approach_circles" => {
only_fade_approach_circles = Some(map.next_value()?)
}
_ => return Err(DeError::unknown_field(key.as_str(), FIELDS)),
}
}
Ok(Self::Value {
only_fade_approach_circles: only_fade_approach_circles.unwrap_or_default(),
})
}
}
d.deserialize_map(HiddenOsuVisitor)
}
}
impl Serialize for HiddenOsu {
fn serialize<S: Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
let field_count = self.only_fade_approach_circles.is_some() as usize;
let mut map = s.serialize_map(Some(field_count))?;
if let Some(ref x) = self.only_fade_approach_circles {
map.serialize_entry("only_fade_approach_circles", x)?;
}
map.end()
}
}
impl<'de> Deserialize<'de> for FlashlightOsu {
fn deserialize<D: Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct FlashlightOsuVisitor;
impl<'de> Visitor<'de> for FlashlightOsuVisitor {
type Value = FlashlightOsu;
fn expecting(&self, f: &mut Formatter<'_>) -> FmtResult {
f.write_str("FlashlightOsu")
}
fn visit_map<A: MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
const FIELDS: &'static [&'static str] =
&["follow_delay", "size_multiplier", "combo_based_size"];
let mut follow_delay = None;
let mut size_multiplier = None;
let mut combo_based_size = None;
while let Some(key) = map.next_key::<MaybeOwnedStr<'de>>()? {
match key.as_str() {
"follow_delay" => follow_delay = Some(map.next_value()?),
"size_multiplier" => size_multiplier = Some(map.next_value()?),
"combo_based_size" => combo_based_size = Some(map.next_value()?),
_ => return Err(DeError::unknown_field(key.as_str(), FIELDS)),
}
}
Ok(Self::Value {
follow_delay: follow_delay.unwrap_or_default(),
size_multiplier: size_multiplier.unwrap_or_default(),
combo_based_size: combo_based_size.unwrap_or_default(),
})
}
}
d.deserialize_map(FlashlightOsuVisitor)
}
}
impl Serialize for FlashlightOsu {
fn serialize<S: Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
let field_count = self.follow_delay.is_some() as usize
+ self.size_multiplier.is_some() as usize
+ self.combo_based_size.is_some() as usize;
let mut map = s.serialize_map(Some(field_count))?;
if let Some(ref x) = self.follow_delay {
map.serialize_entry("follow_delay", x)?;
}
if let Some(ref x) = self.size_multiplier {
map.serialize_entry("size_multiplier", x)?;
}
if let Some(ref x) = self.combo_based_size {
map.serialize_entry("combo_based_size", x)?;
}
map.end()
}
}
impl<'de> Deserialize<'de> for BlindsOsu {
fn deserialize<D: Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct BlindsOsuVisitor;
impl<'de> Visitor<'de> for BlindsOsuVisitor {
type Value = BlindsOsu;
fn expecting(&self, f: &mut Formatter<'_>) -> FmtResult {
f.write_str("BlindsOsu")
}
fn visit_map<A: MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
const FIELDS: &'static [&'static str] = &[];
while let Some(key) = map.next_key::<MaybeOwnedStr<'de>>()? {
match key.as_str() {
_ => return Err(DeError::unknown_field(key.as_str(), FIELDS)),
}
}
Ok(Self::Value {})
}
}
d.deserialize_map(BlindsOsuVisitor)
}
}
impl Serialize for BlindsOsu {
fn serialize<S: Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
let field_count = 0;
let map = s.serialize_map(Some(field_count))?;
map.end()
}
}
impl<'de> Deserialize<'de> for StrictTrackingOsu {
fn deserialize<D: Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct StrictTrackingOsuVisitor;
impl<'de> Visitor<'de> for StrictTrackingOsuVisitor {
type Value = StrictTrackingOsu;
fn expecting(&self, f: &mut Formatter<'_>) -> FmtResult {
f.write_str("StrictTrackingOsu")
}
fn visit_map<A: MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
const FIELDS: &'static [&'static str] = &[];
while let Some(key) = map.next_key::<MaybeOwnedStr<'de>>()? {
match key.as_str() {
_ => return Err(DeError::unknown_field(key.as_str(), FIELDS)),
}
}
Ok(Self::Value {})
}
}
d.deserialize_map(StrictTrackingOsuVisitor)
}
}
impl Serialize for StrictTrackingOsu {
fn serialize<S: Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
let field_count = 0;
let map = s.serialize_map(Some(field_count))?;
map.end()
}
}
impl<'de> Deserialize<'de> for AccuracyChallengeOsu {
fn deserialize<D: Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct AccuracyChallengeOsuVisitor;
impl<'de> Visitor<'de> for AccuracyChallengeOsuVisitor {
type Value = AccuracyChallengeOsu;
fn expecting(&self, f: &mut Formatter<'_>) -> FmtResult {
f.write_str("AccuracyChallengeOsu")
}
fn visit_map<A: MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
const FIELDS: &'static [&'static str] =
&["minimum_accuracy", "accuracy_judge_mode", "restart"];
let mut minimum_accuracy = None;
let mut accuracy_judge_mode = None;
let mut restart = None;
while let Some(key) = map.next_key::<MaybeOwnedStr<'de>>()? {
match key.as_str() {
"minimum_accuracy" => minimum_accuracy = Some(map.next_value()?),
"accuracy_judge_mode" => accuracy_judge_mode = Some(map.next_value()?),
"restart" => restart = Some(map.next_value()?),
_ => return Err(DeError::unknown_field(key.as_str(), FIELDS)),
}
}
Ok(Self::Value {
minimum_accuracy: minimum_accuracy.unwrap_or_default(),
accuracy_judge_mode: accuracy_judge_mode.unwrap_or_default(),
restart: restart.unwrap_or_default(),
})
}
}
d.deserialize_map(AccuracyChallengeOsuVisitor)
}
}
impl Serialize for AccuracyChallengeOsu {
fn serialize<S: Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
let field_count = self.minimum_accuracy.is_some() as usize
+ self.accuracy_judge_mode.is_some() as usize
+ self.restart.is_some() as usize;
let mut map = s.serialize_map(Some(field_count))?;
if let Some(ref x) = self.minimum_accuracy {
map.serialize_entry("minimum_accuracy", x)?;
}
if let Some(ref x) = self.accuracy_judge_mode {
map.serialize_entry("accuracy_judge_mode", x)?;
}
if let Some(ref x) = self.restart {
map.serialize_entry("restart", x)?;
}
map.end()
}
}
impl<'de> Deserialize<'de> for TargetPracticeOsu {
fn deserialize<D: Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct TargetPracticeOsuVisitor;
impl<'de> Visitor<'de> for TargetPracticeOsuVisitor {
type Value = TargetPracticeOsu;
fn expecting(&self, f: &mut Formatter<'_>) -> FmtResult {
f.write_str("TargetPracticeOsu")
}
fn visit_map<A: MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
const FIELDS: &'static [&'static str] = &["seed", "metronome"];
let mut seed = None;
let mut metronome = None;
while let Some(key) = map.next_key::<MaybeOwnedStr<'de>>()? {
match key.as_str() {
"seed" => seed = Some(map.next_value()?),
"metronome" => metronome = Some(map.next_value()?),
_ => return Err(DeError::unknown_field(key.as_str(), FIELDS)),
}
}
Ok(Self::Value {
seed: seed.unwrap_or_default(),
metronome: metronome.unwrap_or_default(),
})
}
}
d.deserialize_map(TargetPracticeOsuVisitor)
}
}
impl Serialize for TargetPracticeOsu {
fn serialize<S: Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
let field_count = self.seed.is_some() as usize + self.metronome.is_some() as usize;
let mut map = s.serialize_map(Some(field_count))?;
if let Some(ref x) = self.seed {
map.serialize_entry("seed", x)?;
}
if let Some(ref x) = self.metronome {
map.serialize_entry("metronome", x)?;
}
map.end()
}
}
impl<'de> Deserialize<'de> for DifficultyAdjustOsu {
fn deserialize<D: Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct DifficultyAdjustOsuVisitor;
impl<'de> Visitor<'de> for DifficultyAdjustOsuVisitor {
type Value = DifficultyAdjustOsu;
fn expecting(&self, f: &mut Formatter<'_>) -> FmtResult {
f.write_str("DifficultyAdjustOsu")
}
fn visit_map<A: MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
const FIELDS: &'static [&'static str] = &[
"circle_size",
"approach_rate",
"drain_rate",
"overall_difficulty",
"extended_limits",
];
let mut circle_size = None;
let mut approach_rate = None;
let mut drain_rate = None;
let mut overall_difficulty = None;
let mut extended_limits = None;
while let Some(key) = map.next_key::<MaybeOwnedStr<'de>>()? {
match key.as_str() {
"circle_size" => circle_size = Some(map.next_value()?),
"approach_rate" => approach_rate = Some(map.next_value()?),
"drain_rate" => drain_rate = Some(map.next_value()?),
"overall_difficulty" => overall_difficulty = Some(map.next_value()?),
"extended_limits" => extended_limits = Some(map.next_value()?),
_ => return Err(DeError::unknown_field(key.as_str(), FIELDS)),
}
}
Ok(Self::Value {
circle_size: circle_size.unwrap_or_default(),
approach_rate: approach_rate.unwrap_or_default(),
drain_rate: drain_rate.unwrap_or_default(),
overall_difficulty: overall_difficulty.unwrap_or_default(),
extended_limits: extended_limits.unwrap_or_default(),
})
}
}
d.deserialize_map(DifficultyAdjustOsuVisitor)
}
}
impl Serialize for DifficultyAdjustOsu {
fn serialize<S: Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
let field_count = self.circle_size.is_some() as usize
+ self.approach_rate.is_some() as usize
+ self.drain_rate.is_some() as usize
+ self.overall_difficulty.is_some() as usize
+ self.extended_limits.is_some() as usize;
let mut map = s.serialize_map(Some(field_count))?;
if let Some(ref x) = self.circle_size {
map.serialize_entry("circle_size", x)?;
}
if let Some(ref x) = self.approach_rate {
map.serialize_entry("approach_rate", x)?;
}
if let Some(ref x) = self.drain_rate {
map.serialize_entry("drain_rate", x)?;
}
if let Some(ref x) = self.overall_difficulty {
map.serialize_entry("overall_difficulty", x)?;
}
if let Some(ref x) = self.extended_limits {
map.serialize_entry("extended_limits", x)?;
}
map.end()
}
}
impl<'de> Deserialize<'de> for ClassicOsu {
fn deserialize<D: Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct ClassicOsuVisitor;
impl<'de> Visitor<'de> for ClassicOsuVisitor {
type Value = ClassicOsu;
fn expecting(&self, f: &mut Formatter<'_>) -> FmtResult {
f.write_str("ClassicOsu")
}
fn visit_map<A: MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
const FIELDS: &'static [&'static str] = &[
"no_slider_head_accuracy",
"classic_note_lock",
"always_play_tail_sample",
"fade_hit_circle_early",
"classic_health",
];
let mut no_slider_head_accuracy = None;
let mut classic_note_lock = None;
let mut always_play_tail_sample = None;
let mut fade_hit_circle_early = None;
let mut classic_health = None;
while let Some(key) = map.next_key::<MaybeOwnedStr<'de>>()? {
match key.as_str() {
"no_slider_head_accuracy" => {
no_slider_head_accuracy = Some(map.next_value()?)
}
"classic_note_lock" => classic_note_lock = Some(map.next_value()?),
"always_play_tail_sample" => {
always_play_tail_sample = Some(map.next_value()?)
}
"fade_hit_circle_early" => {
fade_hit_circle_early = Some(map.next_value()?)
}
"classic_health" => classic_health = Some(map.next_value()?),
_ => return Err(DeError::unknown_field(key.as_str(), FIELDS)),
}
}
Ok(Self::Value {
no_slider_head_accuracy: no_slider_head_accuracy.unwrap_or_default(),
classic_note_lock: classic_note_lock.unwrap_or_default(),
always_play_tail_sample: always_play_tail_sample.unwrap_or_default(),
fade_hit_circle_early: fade_hit_circle_early.unwrap_or_default(),
classic_health: classic_health.unwrap_or_default(),
})
}
}
d.deserialize_map(ClassicOsuVisitor)
}
}
impl Serialize for ClassicOsu {
fn serialize<S: Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
let field_count = self.no_slider_head_accuracy.is_some() as usize
+ self.classic_note_lock.is_some() as usize
+ self.always_play_tail_sample.is_some() as usize
+ self.fade_hit_circle_early.is_some() as usize
+ self.classic_health.is_some() as usize;
let mut map = s.serialize_map(Some(field_count))?;
if let Some(ref x) = self.no_slider_head_accuracy {
map.serialize_entry("no_slider_head_accuracy", x)?;
}
if let Some(ref x) = self.classic_note_lock {
map.serialize_entry("classic_note_lock", x)?;
}
if let Some(ref x) = self.always_play_tail_sample {
map.serialize_entry("always_play_tail_sample", x)?;
}
if let Some(ref x) = self.fade_hit_circle_early {
map.serialize_entry("fade_hit_circle_early", x)?;
}
if let Some(ref x) = self.classic_health {
map.serialize_entry("classic_health", x)?;
}
map.end()
}
}
impl<'de> Deserialize<'de> for RandomOsu {
fn deserialize<D: Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct RandomOsuVisitor;
impl<'de> Visitor<'de> for RandomOsuVisitor {
type Value = RandomOsu;
fn expecting(&self, f: &mut Formatter<'_>) -> FmtResult {
f.write_str("RandomOsu")
}
fn visit_map<A: MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
const FIELDS: &'static [&'static str] = &["angle_sharpness", "seed"];
let mut angle_sharpness = None;
let mut seed = None;
while let Some(key) = map.next_key::<MaybeOwnedStr<'de>>()? {
match key.as_str() {
"angle_sharpness" => angle_sharpness = Some(map.next_value()?),
"seed" => seed = Some(map.next_value()?),
_ => return Err(DeError::unknown_field(key.as_str(), FIELDS)),
}
}
Ok(Self::Value {
angle_sharpness: angle_sharpness.unwrap_or_default(),
seed: seed.unwrap_or_default(),
})
}
}
d.deserialize_map(RandomOsuVisitor)
}
}
impl Serialize for RandomOsu {
fn serialize<S: Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
let field_count =
self.angle_sharpness.is_some() as usize + self.seed.is_some() as usize;
let mut map = s.serialize_map(Some(field_count))?;
if let Some(ref x) = self.angle_sharpness {
map.serialize_entry("angle_sharpness", x)?;
}
if let Some(ref x) = self.seed {
map.serialize_entry("seed", x)?;
}
map.end()
}
}
impl<'de> Deserialize<'de> for MirrorOsu {
fn deserialize<D: Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct MirrorOsuVisitor;
impl<'de> Visitor<'de> for MirrorOsuVisitor {
type Value = MirrorOsu;
fn expecting(&self, f: &mut Formatter<'_>) -> FmtResult {
f.write_str("MirrorOsu")
}
fn visit_map<A: MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
const FIELDS: &'static [&'static str] = &["reflection"];
let mut reflection = None;
while let Some(key) = map.next_key::<MaybeOwnedStr<'de>>()? {
match key.as_str() {
"reflection" => reflection = Some(map.next_value()?),
_ => return Err(DeError::unknown_field(key.as_str(), FIELDS)),
}
}
Ok(Self::Value {
reflection: reflection.unwrap_or_default(),
})
}
}
d.deserialize_map(MirrorOsuVisitor)
}
}
impl Serialize for MirrorOsu {
fn serialize<S: Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
let field_count = self.reflection.is_some() as usize;
let mut map = s.serialize_map(Some(field_count))?;
if let Some(ref x) = self.reflection {
map.serialize_entry("reflection", x)?;
}
map.end()
}
}
impl<'de> Deserialize<'de> for AlternateOsu {
fn deserialize<D: Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct AlternateOsuVisitor;
impl<'de> Visitor<'de> for AlternateOsuVisitor {
type Value = AlternateOsu;
fn expecting(&self, f: &mut Formatter<'_>) -> FmtResult {
f.write_str("AlternateOsu")
}
fn visit_map<A: MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
const FIELDS: &'static [&'static str] = &[];
while let Some(key) = map.next_key::<MaybeOwnedStr<'de>>()? {
match key.as_str() {
_ => return Err(DeError::unknown_field(key.as_str(), FIELDS)),
}
}
Ok(Self::Value {})
}
}
d.deserialize_map(AlternateOsuVisitor)
}
}
impl Serialize for AlternateOsu {
fn serialize<S: Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
let field_count = 0;
let map = s.serialize_map(Some(field_count))?;
map.end()
}
}
impl<'de> Deserialize<'de> for SingleTapOsu {
fn deserialize<D: Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct SingleTapOsuVisitor;
impl<'de> Visitor<'de> for SingleTapOsuVisitor {
type Value = SingleTapOsu;
fn expecting(&self, f: &mut Formatter<'_>) -> FmtResult {
f.write_str("SingleTapOsu")
}
fn visit_map<A: MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
const FIELDS: &'static [&'static str] = &[];
while let Some(key) = map.next_key::<MaybeOwnedStr<'de>>()? {
match key.as_str() {
_ => return Err(DeError::unknown_field(key.as_str(), FIELDS)),
}
}
Ok(Self::Value {})
}
}
d.deserialize_map(SingleTapOsuVisitor)
}
}
impl Serialize for SingleTapOsu {
fn serialize<S: Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
let field_count = 0;
let map = s.serialize_map(Some(field_count))?;
map.end()
}
}
impl<'de> Deserialize<'de> for AutoplayOsu {
fn deserialize<D: Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct AutoplayOsuVisitor;
impl<'de> Visitor<'de> for AutoplayOsuVisitor {
type Value = AutoplayOsu;
fn expecting(&self, f: &mut Formatter<'_>) -> FmtResult {
f.write_str("AutoplayOsu")
}
fn visit_map<A: MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
const FIELDS: &'static [&'static str] = &[];
while let Some(key) = map.next_key::<MaybeOwnedStr<'de>>()? {
match key.as_str() {
_ => return Err(DeError::unknown_field(key.as_str(), FIELDS)),
}
}
Ok(Self::Value {})
}
}
d.deserialize_map(AutoplayOsuVisitor)
}
}
impl Serialize for AutoplayOsu {
fn serialize<S: Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
let field_count = 0;
let map = s.serialize_map(Some(field_count))?;
map.end()
}
}
impl<'de> Deserialize<'de> for CinemaOsu {
fn deserialize<D: Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct CinemaOsuVisitor;
impl<'de> Visitor<'de> for CinemaOsuVisitor {
type Value = CinemaOsu;
fn expecting(&self, f: &mut Formatter<'_>) -> FmtResult {
f.write_str("CinemaOsu")
}
fn visit_map<A: MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
const FIELDS: &'static [&'static str] = &[];
while let Some(key) = map.next_key::<MaybeOwnedStr<'de>>()? {
match key.as_str() {
_ => return Err(DeError::unknown_field(key.as_str(), FIELDS)),
}
}
Ok(Self::Value {})
}
}
d.deserialize_map(CinemaOsuVisitor)
}
}
impl Serialize for CinemaOsu {
fn serialize<S: Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
let field_count = 0;
let map = s.serialize_map(Some(field_count))?;
map.end()
}
}
impl<'de> Deserialize<'de> for RelaxOsu {
fn deserialize<D: Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct RelaxOsuVisitor;
impl<'de> Visitor<'de> for RelaxOsuVisitor {
type Value = RelaxOsu;
fn expecting(&self, f: &mut Formatter<'_>) -> FmtResult {
f.write_str("RelaxOsu")
}
fn visit_map<A: MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
const FIELDS: &'static [&'static str] = &[];
while let Some(key) = map.next_key::<MaybeOwnedStr<'de>>()? {
match key.as_str() {
_ => return Err(DeError::unknown_field(key.as_str(), FIELDS)),
}
}
Ok(Self::Value {})
}
}
d.deserialize_map(RelaxOsuVisitor)
}
}
impl Serialize for RelaxOsu {
fn serialize<S: Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
let field_count = 0;
let map = s.serialize_map(Some(field_count))?;
map.end()
}
}
impl<'de> Deserialize<'de> for AutopilotOsu {
fn deserialize<D: Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct AutopilotOsuVisitor;
impl<'de> Visitor<'de> for AutopilotOsuVisitor {
type Value = AutopilotOsu;
fn expecting(&self, f: &mut Formatter<'_>) -> FmtResult {
f.write_str("AutopilotOsu")
}
fn visit_map<A: MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
const FIELDS: &'static [&'static str] = &[];
while let Some(key) = map.next_key::<MaybeOwnedStr<'de>>()? {
match key.as_str() {
_ => return Err(DeError::unknown_field(key.as_str(), FIELDS)),
}
}
Ok(Self::Value {})
}
}
d.deserialize_map(AutopilotOsuVisitor)
}
}
impl Serialize for AutopilotOsu {
fn serialize<S: Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
let field_count = 0;
let map = s.serialize_map(Some(field_count))?;
map.end()
}
}
impl<'de> Deserialize<'de> for SpunOutOsu {
fn deserialize<D: Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct SpunOutOsuVisitor;
impl<'de> Visitor<'de> for SpunOutOsuVisitor {
type Value = SpunOutOsu;
fn expecting(&self, f: &mut Formatter<'_>) -> FmtResult {
f.write_str("SpunOutOsu")
}
fn visit_map<A: MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
const FIELDS: &'static [&'static str] = &[];
while let Some(key) = map.next_key::<MaybeOwnedStr<'de>>()? {
match key.as_str() {
_ => return Err(DeError::unknown_field(key.as_str(), FIELDS)),
}
}
Ok(Self::Value {})
}
}
d.deserialize_map(SpunOutOsuVisitor)
}
}
impl Serialize for SpunOutOsu {
fn serialize<S: Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
let field_count = 0;
let map = s.serialize_map(Some(field_count))?;
map.end()
}
}
impl<'de> Deserialize<'de> for TransformOsu {
fn deserialize<D: Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct TransformOsuVisitor;
impl<'de> Visitor<'de> for TransformOsuVisitor {
type Value = TransformOsu;
fn expecting(&self, f: &mut Formatter<'_>) -> FmtResult {
f.write_str("TransformOsu")
}
fn visit_map<A: MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
const FIELDS: &'static [&'static str] = &[];
while let Some(key) = map.next_key::<MaybeOwnedStr<'de>>()? {
match key.as_str() {
_ => return Err(DeError::unknown_field(key.as_str(), FIELDS)),
}
}
Ok(Self::Value {})
}
}
d.deserialize_map(TransformOsuVisitor)
}
}
impl Serialize for TransformOsu {
fn serialize<S: Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
let field_count = 0;
let map = s.serialize_map(Some(field_count))?;
map.end()
}
}
impl<'de> Deserialize<'de> for WiggleOsu {
fn deserialize<D: Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct WiggleOsuVisitor;
impl<'de> Visitor<'de> for WiggleOsuVisitor {
type Value = WiggleOsu;
fn expecting(&self, f: &mut Formatter<'_>) -> FmtResult {
f.write_str("WiggleOsu")
}
fn visit_map<A: MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
const FIELDS: &'static [&'static str] = &["strength"];
let mut strength = None;
while let Some(key) = map.next_key::<MaybeOwnedStr<'de>>()? {
match key.as_str() {
"strength" => strength = Some(map.next_value()?),
_ => return Err(DeError::unknown_field(key.as_str(), FIELDS)),
}
}
Ok(Self::Value {
strength: strength.unwrap_or_default(),
})
}
}
d.deserialize_map(WiggleOsuVisitor)
}
}
impl Serialize for WiggleOsu {
fn serialize<S: Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
let field_count = self.strength.is_some() as usize;
let mut map = s.serialize_map(Some(field_count))?;
if let Some(ref x) = self.strength {
map.serialize_entry("strength", x)?;
}
map.end()
}
}
impl<'de> Deserialize<'de> for SpinInOsu {
fn deserialize<D: Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct SpinInOsuVisitor;
impl<'de> Visitor<'de> for SpinInOsuVisitor {
type Value = SpinInOsu;
fn expecting(&self, f: &mut Formatter<'_>) -> FmtResult {
f.write_str("SpinInOsu")
}
fn visit_map<A: MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
const FIELDS: &'static [&'static str] = &[];
while let Some(key) = map.next_key::<MaybeOwnedStr<'de>>()? {
match key.as_str() {
_ => return Err(DeError::unknown_field(key.as_str(), FIELDS)),
}
}
Ok(Self::Value {})
}
}
d.deserialize_map(SpinInOsuVisitor)
}
}
impl Serialize for SpinInOsu {
fn serialize<S: Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
let field_count = 0;
let map = s.serialize_map(Some(field_count))?;
map.end()
}
}
impl<'de> Deserialize<'de> for GrowOsu {
fn deserialize<D: Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct GrowOsuVisitor;
impl<'de> Visitor<'de> for GrowOsuVisitor {
type Value = GrowOsu;
fn expecting(&self, f: &mut Formatter<'_>) -> FmtResult {
f.write_str("GrowOsu")
}
fn visit_map<A: MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
const FIELDS: &'static [&'static str] = &["start_scale"];
let mut start_scale = None;
while let Some(key) = map.next_key::<MaybeOwnedStr<'de>>()? {
match key.as_str() {
"start_scale" => start_scale = Some(map.next_value()?),
_ => return Err(DeError::unknown_field(key.as_str(), FIELDS)),
}
}
Ok(Self::Value {
start_scale: start_scale.unwrap_or_default(),
})
}
}
d.deserialize_map(GrowOsuVisitor)
}
}
impl Serialize for GrowOsu {
fn serialize<S: Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
let field_count = self.start_scale.is_some() as usize;
let mut map = s.serialize_map(Some(field_count))?;
if let Some(ref x) = self.start_scale {
map.serialize_entry("start_scale", x)?;
}
map.end()
}
}
impl<'de> Deserialize<'de> for DeflateOsu {
fn deserialize<D: Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct DeflateOsuVisitor;
impl<'de> Visitor<'de> for DeflateOsuVisitor {
type Value = DeflateOsu;
fn expecting(&self, f: &mut Formatter<'_>) -> FmtResult {
f.write_str("DeflateOsu")
}
fn visit_map<A: MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
const FIELDS: &'static [&'static str] = &["start_scale"];
let mut start_scale = None;
while let Some(key) = map.next_key::<MaybeOwnedStr<'de>>()? {
match key.as_str() {
"start_scale" => start_scale = Some(map.next_value()?),
_ => return Err(DeError::unknown_field(key.as_str(), FIELDS)),
}
}
Ok(Self::Value {
start_scale: start_scale.unwrap_or_default(),
})
}
}
d.deserialize_map(DeflateOsuVisitor)
}
}
impl Serialize for DeflateOsu {
fn serialize<S: Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
let field_count = self.start_scale.is_some() as usize;
let mut map = s.serialize_map(Some(field_count))?;
if let Some(ref x) = self.start_scale {
map.serialize_entry("start_scale", x)?;
}
map.end()
}
}
impl<'de> Deserialize<'de> for WindUpOsu {
fn deserialize<D: Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct WindUpOsuVisitor;
impl<'de> Visitor<'de> for WindUpOsuVisitor {
type Value = WindUpOsu;
fn expecting(&self, f: &mut Formatter<'_>) -> FmtResult {
f.write_str("WindUpOsu")
}
fn visit_map<A: MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
const FIELDS: &'static [&'static str] =
&["initial_rate", "final_rate", "adjust_pitch"];
let mut initial_rate = None;
let mut final_rate = None;
let mut adjust_pitch = None;
while let Some(key) = map.next_key::<MaybeOwnedStr<'de>>()? {
match key.as_str() {
"initial_rate" => initial_rate = Some(map.next_value()?),
"final_rate" => final_rate = Some(map.next_value()?),
"adjust_pitch" => adjust_pitch = Some(map.next_value()?),
_ => return Err(DeError::unknown_field(key.as_str(), FIELDS)),
}
}
Ok(Self::Value {
initial_rate: initial_rate.unwrap_or_default(),
final_rate: final_rate.unwrap_or_default(),
adjust_pitch: adjust_pitch.unwrap_or_default(),
})
}
}
d.deserialize_map(WindUpOsuVisitor)
}
}
impl Serialize for WindUpOsu {
fn serialize<S: Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
let field_count = self.initial_rate.is_some() as usize
+ self.final_rate.is_some() as usize
+ self.adjust_pitch.is_some() as usize;
let mut map = s.serialize_map(Some(field_count))?;
if let Some(ref x) = self.initial_rate {
map.serialize_entry("initial_rate", x)?;
}
if let Some(ref x) = self.final_rate {
map.serialize_entry("final_rate", x)?;
}
if let Some(ref x) = self.adjust_pitch {
map.serialize_entry("adjust_pitch", x)?;
}
map.end()
}
}
impl<'de> Deserialize<'de> for WindDownOsu {
fn deserialize<D: Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct WindDownOsuVisitor;
impl<'de> Visitor<'de> for WindDownOsuVisitor {
type Value = WindDownOsu;
fn expecting(&self, f: &mut Formatter<'_>) -> FmtResult {
f.write_str("WindDownOsu")
}
fn visit_map<A: MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
const FIELDS: &'static [&'static str] =
&["initial_rate", "final_rate", "adjust_pitch"];
let mut initial_rate = None;
let mut final_rate = None;
let mut adjust_pitch = None;
while let Some(key) = map.next_key::<MaybeOwnedStr<'de>>()? {
match key.as_str() {
"initial_rate" => initial_rate = Some(map.next_value()?),
"final_rate" => final_rate = Some(map.next_value()?),
"adjust_pitch" => adjust_pitch = Some(map.next_value()?),
_ => return Err(DeError::unknown_field(key.as_str(), FIELDS)),
}
}
Ok(Self::Value {
initial_rate: initial_rate.unwrap_or_default(),
final_rate: final_rate.unwrap_or_default(),
adjust_pitch: adjust_pitch.unwrap_or_default(),
})
}
}
d.deserialize_map(WindDownOsuVisitor)
}
}
impl Serialize for WindDownOsu {
fn serialize<S: Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
let field_count = self.initial_rate.is_some() as usize
+ self.final_rate.is_some() as usize
+ self.adjust_pitch.is_some() as usize;
let mut map = s.serialize_map(Some(field_count))?;
if let Some(ref x) = self.initial_rate {
map.serialize_entry("initial_rate", x)?;
}
if let Some(ref x) = self.final_rate {
map.serialize_entry("final_rate", x)?;
}
if let Some(ref x) = self.adjust_pitch {
map.serialize_entry("adjust_pitch", x)?;
}
map.end()
}
}
impl<'de> Deserialize<'de> for TraceableOsu {
fn deserialize<D: Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct TraceableOsuVisitor;
impl<'de> Visitor<'de> for TraceableOsuVisitor {
type Value = TraceableOsu;
fn expecting(&self, f: &mut Formatter<'_>) -> FmtResult {
f.write_str("TraceableOsu")
}
fn visit_map<A: MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
const FIELDS: &'static [&'static str] = &[];
while let Some(key) = map.next_key::<MaybeOwnedStr<'de>>()? {
match key.as_str() {
_ => return Err(DeError::unknown_field(key.as_str(), FIELDS)),
}
}
Ok(Self::Value {})
}
}
d.deserialize_map(TraceableOsuVisitor)
}
}
impl Serialize for TraceableOsu {
fn serialize<S: Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
let field_count = 0;
let map = s.serialize_map(Some(field_count))?;
map.end()
}
}
impl<'de> Deserialize<'de> for BarrelRollOsu {
fn deserialize<D: Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct BarrelRollOsuVisitor;
impl<'de> Visitor<'de> for BarrelRollOsuVisitor {
type Value = BarrelRollOsu;
fn expecting(&self, f: &mut Formatter<'_>) -> FmtResult {
f.write_str("BarrelRollOsu")
}
fn visit_map<A: MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
const FIELDS: &'static [&'static str] = &["spin_speed", "direction"];
let mut spin_speed = None;
let mut direction = None;
while let Some(key) = map.next_key::<MaybeOwnedStr<'de>>()? {
match key.as_str() {
"spin_speed" => spin_speed = Some(map.next_value()?),
"direction" => direction = Some(map.next_value()?),
_ => return Err(DeError::unknown_field(key.as_str(), FIELDS)),
}
}
Ok(Self::Value {
spin_speed: spin_speed.unwrap_or_default(),
direction: direction.unwrap_or_default(),
})
}
}
d.deserialize_map(BarrelRollOsuVisitor)
}
}
impl Serialize for BarrelRollOsu {
fn serialize<S: Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
let field_count =
self.spin_speed.is_some() as usize + self.direction.is_some() as usize;
let mut map = s.serialize_map(Some(field_count))?;
if let Some(ref x) = self.spin_speed {
map.serialize_entry("spin_speed", x)?;
}
if let Some(ref x) = self.direction {
map.serialize_entry("direction", x)?;
}
map.end()
}
}
impl<'de> Deserialize<'de> for ApproachDifferentOsu {
fn deserialize<D: Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct ApproachDifferentOsuVisitor;
impl<'de> Visitor<'de> for ApproachDifferentOsuVisitor {
type Value = ApproachDifferentOsu;
fn expecting(&self, f: &mut Formatter<'_>) -> FmtResult {
f.write_str("ApproachDifferentOsu")
}
fn visit_map<A: MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
const FIELDS: &'static [&'static str] = &["scale", "style"];
let mut scale = None;
let mut style = None;
while let Some(key) = map.next_key::<MaybeOwnedStr<'de>>()? {
match key.as_str() {
"scale" => scale = Some(map.next_value()?),
"style" => style = Some(map.next_value()?),
_ => return Err(DeError::unknown_field(key.as_str(), FIELDS)),
}
}
Ok(Self::Value {
scale: scale.unwrap_or_default(),
style: style.unwrap_or_default(),
})
}
}
d.deserialize_map(ApproachDifferentOsuVisitor)
}
}
impl Serialize for ApproachDifferentOsu {
fn serialize<S: Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
let field_count = self.scale.is_some() as usize + self.style.is_some() as usize;
let mut map = s.serialize_map(Some(field_count))?;
if let Some(ref x) = self.scale {
map.serialize_entry("scale", x)?;
}
if let Some(ref x) = self.style {
map.serialize_entry("style", x)?;
}
map.end()
}
}
impl<'de> Deserialize<'de> for MutedOsu {
fn deserialize<D: Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct MutedOsuVisitor;
impl<'de> Visitor<'de> for MutedOsuVisitor {
type Value = MutedOsu;
fn expecting(&self, f: &mut Formatter<'_>) -> FmtResult {
f.write_str("MutedOsu")
}
fn visit_map<A: MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
const FIELDS: &'static [&'static str] = &[
"inverse_muting",
"enable_metronome",
"mute_combo_count",
"affects_hit_sounds",
];
let mut inverse_muting = None;
let mut enable_metronome = None;
let mut mute_combo_count = None;
let mut affects_hit_sounds = None;
while let Some(key) = map.next_key::<MaybeOwnedStr<'de>>()? {
match key.as_str() {
"inverse_muting" => inverse_muting = Some(map.next_value()?),
"enable_metronome" => enable_metronome = Some(map.next_value()?),
"mute_combo_count" => mute_combo_count = Some(map.next_value()?),
"affects_hit_sounds" => affects_hit_sounds = Some(map.next_value()?),
_ => return Err(DeError::unknown_field(key.as_str(), FIELDS)),
}
}
Ok(Self::Value {
inverse_muting: inverse_muting.unwrap_or_default(),
enable_metronome: enable_metronome.unwrap_or_default(),
mute_combo_count: mute_combo_count.unwrap_or_default(),
affects_hit_sounds: affects_hit_sounds.unwrap_or_default(),
})
}
}
d.deserialize_map(MutedOsuVisitor)
}
}
impl Serialize for MutedOsu {
fn serialize<S: Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
let field_count = self.inverse_muting.is_some() as usize
+ self.enable_metronome.is_some() as usize
+ self.mute_combo_count.is_some() as usize
+ self.affects_hit_sounds.is_some() as usize;
let mut map = s.serialize_map(Some(field_count))?;
if let Some(ref x) = self.inverse_muting {
map.serialize_entry("inverse_muting", x)?;
}
if let Some(ref x) = self.enable_metronome {
map.serialize_entry("enable_metronome", x)?;
}
if let Some(ref x) = self.mute_combo_count {
map.serialize_entry("mute_combo_count", x)?;
}
if let Some(ref x) = self.affects_hit_sounds {
map.serialize_entry("affects_hit_sounds", x)?;
}
map.end()
}
}
impl<'de> Deserialize<'de> for NoScopeOsu {
fn deserialize<D: Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct NoScopeOsuVisitor;
impl<'de> Visitor<'de> for NoScopeOsuVisitor {
type Value = NoScopeOsu;
fn expecting(&self, f: &mut Formatter<'_>) -> FmtResult {
f.write_str("NoScopeOsu")
}
fn visit_map<A: MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
const FIELDS: &'static [&'static str] = &["hidden_combo_count"];
let mut hidden_combo_count = None;
while let Some(key) = map.next_key::<MaybeOwnedStr<'de>>()? {
match key.as_str() {
"hidden_combo_count" => hidden_combo_count = Some(map.next_value()?),
_ => return Err(DeError::unknown_field(key.as_str(), FIELDS)),
}
}
Ok(Self::Value {
hidden_combo_count: hidden_combo_count.unwrap_or_default(),
})
}
}
d.deserialize_map(NoScopeOsuVisitor)
}
}
impl Serialize for NoScopeOsu {
fn serialize<S: Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
let field_count = self.hidden_combo_count.is_some() as usize;
let mut map = s.serialize_map(Some(field_count))?;
if let Some(ref x) = self.hidden_combo_count {
map.serialize_entry("hidden_combo_count", x)?;
}
map.end()
}
}
impl<'de> Deserialize<'de> for MagnetisedOsu {
fn deserialize<D: Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct MagnetisedOsuVisitor;
impl<'de> Visitor<'de> for MagnetisedOsuVisitor {
type Value = MagnetisedOsu;
fn expecting(&self, f: &mut Formatter<'_>) -> FmtResult {
f.write_str("MagnetisedOsu")
}
fn visit_map<A: MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
const FIELDS: &'static [&'static str] = &["attraction_strength"];
let mut attraction_strength = None;
while let Some(key) = map.next_key::<MaybeOwnedStr<'de>>()? {
match key.as_str() {
"attraction_strength" => attraction_strength = Some(map.next_value()?),
_ => return Err(DeError::unknown_field(key.as_str(), FIELDS)),
}
}
Ok(Self::Value {
attraction_strength: attraction_strength.unwrap_or_default(),
})
}
}
d.deserialize_map(MagnetisedOsuVisitor)
}
}
impl Serialize for MagnetisedOsu {
fn serialize<S: Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
let field_count = self.attraction_strength.is_some() as usize;
let mut map = s.serialize_map(Some(field_count))?;
if let Some(ref x) = self.attraction_strength {
map.serialize_entry("attraction_strength", x)?;
}
map.end()
}
}
impl<'de> Deserialize<'de> for RepelOsu {
fn deserialize<D: Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct RepelOsuVisitor;
impl<'de> Visitor<'de> for RepelOsuVisitor {
type Value = RepelOsu;
fn expecting(&self, f: &mut Formatter<'_>) -> FmtResult {
f.write_str("RepelOsu")
}
fn visit_map<A: MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
const FIELDS: &'static [&'static str] = &["repulsion_strength"];
let mut repulsion_strength = None;
while let Some(key) = map.next_key::<MaybeOwnedStr<'de>>()? {
match key.as_str() {
"repulsion_strength" => repulsion_strength = Some(map.next_value()?),
_ => return Err(DeError::unknown_field(key.as_str(), FIELDS)),
}
}
Ok(Self::Value {
repulsion_strength: repulsion_strength.unwrap_or_default(),
})
}
}
d.deserialize_map(RepelOsuVisitor)
}
}
impl Serialize for RepelOsu {
fn serialize<S: Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
let field_count = self.repulsion_strength.is_some() as usize;
let mut map = s.serialize_map(Some(field_count))?;
if let Some(ref x) = self.repulsion_strength {
map.serialize_entry("repulsion_strength", x)?;
}
map.end()
}
}
impl<'de> Deserialize<'de> for AdaptiveSpeedOsu {
fn deserialize<D: Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct AdaptiveSpeedOsuVisitor;
impl<'de> Visitor<'de> for AdaptiveSpeedOsuVisitor {
type Value = AdaptiveSpeedOsu;
fn expecting(&self, f: &mut Formatter<'_>) -> FmtResult {
f.write_str("AdaptiveSpeedOsu")
}
fn visit_map<A: MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
const FIELDS: &'static [&'static str] = &["initial_rate", "adjust_pitch"];
let mut initial_rate = None;
let mut adjust_pitch = None;
while let Some(key) = map.next_key::<MaybeOwnedStr<'de>>()? {
match key.as_str() {
"initial_rate" => initial_rate = Some(map.next_value()?),
"adjust_pitch" => adjust_pitch = Some(map.next_value()?),
_ => return Err(DeError::unknown_field(key.as_str(), FIELDS)),
}
}
Ok(Self::Value {
initial_rate: initial_rate.unwrap_or_default(),
adjust_pitch: adjust_pitch.unwrap_or_default(),
})
}
}
d.deserialize_map(AdaptiveSpeedOsuVisitor)
}
}
impl Serialize for AdaptiveSpeedOsu {
fn serialize<S: Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
let field_count =
self.initial_rate.is_some() as usize + self.adjust_pitch.is_some() as usize;
let mut map = s.serialize_map(Some(field_count))?;
if let Some(ref x) = self.initial_rate {
map.serialize_entry("initial_rate", x)?;
}
if let Some(ref x) = self.adjust_pitch {
map.serialize_entry("adjust_pitch", x)?;
}
map.end()
}
}
impl<'de> Deserialize<'de> for FreezeFrameOsu {
fn deserialize<D: Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct FreezeFrameOsuVisitor;
impl<'de> Visitor<'de> for FreezeFrameOsuVisitor {
type Value = FreezeFrameOsu;
fn expecting(&self, f: &mut Formatter<'_>) -> FmtResult {
f.write_str("FreezeFrameOsu")
}
fn visit_map<A: MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
const FIELDS: &'static [&'static str] = &[];
while let Some(key) = map.next_key::<MaybeOwnedStr<'de>>()? {
match key.as_str() {
_ => return Err(DeError::unknown_field(key.as_str(), FIELDS)),
}
}
Ok(Self::Value {})
}
}
d.deserialize_map(FreezeFrameOsuVisitor)
}
}
impl Serialize for FreezeFrameOsu {
fn serialize<S: Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
let field_count = 0;
let map = s.serialize_map(Some(field_count))?;
map.end()
}
}
impl<'de> Deserialize<'de> for BubblesOsu {
fn deserialize<D: Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct BubblesOsuVisitor;
impl<'de> Visitor<'de> for BubblesOsuVisitor {
type Value = BubblesOsu;
fn expecting(&self, f: &mut Formatter<'_>) -> FmtResult {
f.write_str("BubblesOsu")
}
fn visit_map<A: MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
const FIELDS: &'static [&'static str] = &[];
while let Some(key) = map.next_key::<MaybeOwnedStr<'de>>()? {
match key.as_str() {
_ => return Err(DeError::unknown_field(key.as_str(), FIELDS)),
}
}
Ok(Self::Value {})
}
}
d.deserialize_map(BubblesOsuVisitor)
}
}
impl Serialize for BubblesOsu {
fn serialize<S: Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
let field_count = 0;
let map = s.serialize_map(Some(field_count))?;
map.end()
}
}
impl<'de> Deserialize<'de> for SynesthesiaOsu {
fn deserialize<D: Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct SynesthesiaOsuVisitor;
impl<'de> Visitor<'de> for SynesthesiaOsuVisitor {
type Value = SynesthesiaOsu;
fn expecting(&self, f: &mut Formatter<'_>) -> FmtResult {
f.write_str("SynesthesiaOsu")
}
fn visit_map<A: MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
const FIELDS: &'static [&'static str] = &[];
while let Some(key) = map.next_key::<MaybeOwnedStr<'de>>()? {
match key.as_str() {
_ => return Err(DeError::unknown_field(key.as_str(), FIELDS)),
}
}
Ok(Self::Value {})
}
}
d.deserialize_map(SynesthesiaOsuVisitor)
}
}
impl Serialize for SynesthesiaOsu {
fn serialize<S: Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
let field_count = 0;
let map = s.serialize_map(Some(field_count))?;
map.end()
}
}
impl<'de> Deserialize<'de> for DepthOsu {
fn deserialize<D: Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct DepthOsuVisitor;
impl<'de> Visitor<'de> for DepthOsuVisitor {
type Value = DepthOsu;
fn expecting(&self, f: &mut Formatter<'_>) -> FmtResult {
f.write_str("DepthOsu")
}
fn visit_map<A: MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
const FIELDS: &'static [&'static str] = &["max_depth", "show_approach_circles"];
let mut max_depth = None;
let mut show_approach_circles = None;
while let Some(key) = map.next_key::<MaybeOwnedStr<'de>>()? {
match key.as_str() {
"max_depth" => max_depth = Some(map.next_value()?),
"show_approach_circles" => {
show_approach_circles = Some(map.next_value()?)
}
_ => return Err(DeError::unknown_field(key.as_str(), FIELDS)),
}
}
Ok(Self::Value {
max_depth: max_depth.unwrap_or_default(),
show_approach_circles: show_approach_circles.unwrap_or_default(),
})
}
}
d.deserialize_map(DepthOsuVisitor)
}
}
impl Serialize for DepthOsu {
fn serialize<S: Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
let field_count =
self.max_depth.is_some() as usize + self.show_approach_circles.is_some() as usize;
let mut map = s.serialize_map(Some(field_count))?;
if let Some(ref x) = self.max_depth {
map.serialize_entry("max_depth", x)?;
}
if let Some(ref x) = self.show_approach_circles {
map.serialize_entry("show_approach_circles", x)?;
}
map.end()
}
}
impl<'de> Deserialize<'de> for TouchDeviceOsu {
fn deserialize<D: Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct TouchDeviceOsuVisitor;
impl<'de> Visitor<'de> for TouchDeviceOsuVisitor {
type Value = TouchDeviceOsu;
fn expecting(&self, f: &mut Formatter<'_>) -> FmtResult {
f.write_str("TouchDeviceOsu")
}
fn visit_map<A: MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
const FIELDS: &'static [&'static str] = &[];
while let Some(key) = map.next_key::<MaybeOwnedStr<'de>>()? {
match key.as_str() {
_ => return Err(DeError::unknown_field(key.as_str(), FIELDS)),
}
}
Ok(Self::Value {})
}
}
d.deserialize_map(TouchDeviceOsuVisitor)
}
}
impl Serialize for TouchDeviceOsu {
fn serialize<S: Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
let field_count = 0;
let map = s.serialize_map(Some(field_count))?;
map.end()
}
}
impl<'de> Deserialize<'de> for ScoreV2Osu {
fn deserialize<D: Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct ScoreV2OsuVisitor;
impl<'de> Visitor<'de> for ScoreV2OsuVisitor {
type Value = ScoreV2Osu;
fn expecting(&self, f: &mut Formatter<'_>) -> FmtResult {
f.write_str("ScoreV2Osu")
}
fn visit_map<A: MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
const FIELDS: &'static [&'static str] = &[];
while let Some(key) = map.next_key::<MaybeOwnedStr<'de>>()? {
match key.as_str() {
_ => return Err(DeError::unknown_field(key.as_str(), FIELDS)),
}
}
Ok(Self::Value {})
}
}
d.deserialize_map(ScoreV2OsuVisitor)
}
}
impl Serialize for ScoreV2Osu {
fn serialize<S: Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
let field_count = 0;
let map = s.serialize_map(Some(field_count))?;
map.end()
}
}
impl<'de> Deserialize<'de> for EasyTaiko {
fn deserialize<D: Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct EasyTaikoVisitor;
impl<'de> Visitor<'de> for EasyTaikoVisitor {
type Value = EasyTaiko;
fn expecting(&self, f: &mut Formatter<'_>) -> FmtResult {
f.write_str("EasyTaiko")
}
fn visit_map<A: MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
const FIELDS: &'static [&'static str] = &[];
while let Some(key) = map.next_key::<MaybeOwnedStr<'de>>()? {
match key.as_str() {
_ => return Err(DeError::unknown_field(key.as_str(), FIELDS)),
}
}
Ok(Self::Value {})
}
}
d.deserialize_map(EasyTaikoVisitor)
}
}
impl Serialize for EasyTaiko {
fn serialize<S: Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
let field_count = 0;
let map = s.serialize_map(Some(field_count))?;
map.end()
}
}
impl<'de> Deserialize<'de> for NoFailTaiko {
fn deserialize<D: Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct NoFailTaikoVisitor;
impl<'de> Visitor<'de> for NoFailTaikoVisitor {
type Value = NoFailTaiko;
fn expecting(&self, f: &mut Formatter<'_>) -> FmtResult {
f.write_str("NoFailTaiko")
}
fn visit_map<A: MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
const FIELDS: &'static [&'static str] = &[];
while let Some(key) = map.next_key::<MaybeOwnedStr<'de>>()? {
match key.as_str() {
_ => return Err(DeError::unknown_field(key.as_str(), FIELDS)),
}
}
Ok(Self::Value {})
}
}
d.deserialize_map(NoFailTaikoVisitor)
}
}
impl Serialize for NoFailTaiko {
fn serialize<S: Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
let field_count = 0;
let map = s.serialize_map(Some(field_count))?;
map.end()
}
}
impl<'de> Deserialize<'de> for HalfTimeTaiko {
fn deserialize<D: Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct HalfTimeTaikoVisitor;
impl<'de> Visitor<'de> for HalfTimeTaikoVisitor {
type Value = HalfTimeTaiko;
fn expecting(&self, f: &mut Formatter<'_>) -> FmtResult {
f.write_str("HalfTimeTaiko")
}
fn visit_map<A: MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
const FIELDS: &'static [&'static str] = &["speed_change", "adjust_pitch"];
let mut speed_change = None;
let mut adjust_pitch = None;
while let Some(key) = map.next_key::<MaybeOwnedStr<'de>>()? {
match key.as_str() {
"speed_change" => speed_change = Some(map.next_value()?),
"adjust_pitch" => adjust_pitch = Some(map.next_value()?),
_ => return Err(DeError::unknown_field(key.as_str(), FIELDS)),
}
}
Ok(Self::Value {
speed_change: speed_change.unwrap_or_default(),
adjust_pitch: adjust_pitch.unwrap_or_default(),
})
}
}
d.deserialize_map(HalfTimeTaikoVisitor)
}
}
impl Serialize for HalfTimeTaiko {
fn serialize<S: Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
let field_count =
self.speed_change.is_some() as usize + self.adjust_pitch.is_some() as usize;
let mut map = s.serialize_map(Some(field_count))?;
if let Some(ref x) = self.speed_change {
map.serialize_entry("speed_change", x)?;
}
if let Some(ref x) = self.adjust_pitch {
map.serialize_entry("adjust_pitch", x)?;
}
map.end()
}
}
impl<'de> Deserialize<'de> for DaycoreTaiko {
fn deserialize<D: Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct DaycoreTaikoVisitor;
impl<'de> Visitor<'de> for DaycoreTaikoVisitor {
type Value = DaycoreTaiko;
fn expecting(&self, f: &mut Formatter<'_>) -> FmtResult {
f.write_str("DaycoreTaiko")
}
fn visit_map<A: MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
const FIELDS: &'static [&'static str] = &["speed_change"];
let mut speed_change = None;
while let Some(key) = map.next_key::<MaybeOwnedStr<'de>>()? {
match key.as_str() {
"speed_change" => speed_change = Some(map.next_value()?),
_ => return Err(DeError::unknown_field(key.as_str(), FIELDS)),
}
}
Ok(Self::Value {
speed_change: speed_change.unwrap_or_default(),
})
}
}
d.deserialize_map(DaycoreTaikoVisitor)
}
}
impl Serialize for DaycoreTaiko {
fn serialize<S: Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
let field_count = self.speed_change.is_some() as usize;
let mut map = s.serialize_map(Some(field_count))?;
if let Some(ref x) = self.speed_change {
map.serialize_entry("speed_change", x)?;
}
map.end()
}
}
impl<'de> Deserialize<'de> for HardRockTaiko {
fn deserialize<D: Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct HardRockTaikoVisitor;
impl<'de> Visitor<'de> for HardRockTaikoVisitor {
type Value = HardRockTaiko;
fn expecting(&self, f: &mut Formatter<'_>) -> FmtResult {
f.write_str("HardRockTaiko")
}
fn visit_map<A: MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
const FIELDS: &'static [&'static str] = &[];
while let Some(key) = map.next_key::<MaybeOwnedStr<'de>>()? {
match key.as_str() {
_ => return Err(DeError::unknown_field(key.as_str(), FIELDS)),
}
}
Ok(Self::Value {})
}
}
d.deserialize_map(HardRockTaikoVisitor)
}
}
impl Serialize for HardRockTaiko {
fn serialize<S: Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
let field_count = 0;
let map = s.serialize_map(Some(field_count))?;
map.end()
}
}
impl<'de> Deserialize<'de> for SuddenDeathTaiko {
fn deserialize<D: Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct SuddenDeathTaikoVisitor;
impl<'de> Visitor<'de> for SuddenDeathTaikoVisitor {
type Value = SuddenDeathTaiko;
fn expecting(&self, f: &mut Formatter<'_>) -> FmtResult {
f.write_str("SuddenDeathTaiko")
}
fn visit_map<A: MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
const FIELDS: &'static [&'static str] = &["restart"];
let mut restart = None;
while let Some(key) = map.next_key::<MaybeOwnedStr<'de>>()? {
match key.as_str() {
"restart" => restart = Some(map.next_value()?),
_ => return Err(DeError::unknown_field(key.as_str(), FIELDS)),
}
}
Ok(Self::Value {
restart: restart.unwrap_or_default(),
})
}
}
d.deserialize_map(SuddenDeathTaikoVisitor)
}
}
impl Serialize for SuddenDeathTaiko {
fn serialize<S: Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
let field_count = self.restart.is_some() as usize;
let mut map = s.serialize_map(Some(field_count))?;
if let Some(ref x) = self.restart {
map.serialize_entry("restart", x)?;
}
map.end()
}
}
impl<'de> Deserialize<'de> for PerfectTaiko {
fn deserialize<D: Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct PerfectTaikoVisitor;
impl<'de> Visitor<'de> for PerfectTaikoVisitor {
type Value = PerfectTaiko;
fn expecting(&self, f: &mut Formatter<'_>) -> FmtResult {
f.write_str("PerfectTaiko")
}
fn visit_map<A: MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
const FIELDS: &'static [&'static str] = &["restart"];
let mut restart = None;
while let Some(key) = map.next_key::<MaybeOwnedStr<'de>>()? {
match key.as_str() {
"restart" => restart = Some(map.next_value()?),
_ => return Err(DeError::unknown_field(key.as_str(), FIELDS)),
}
}
Ok(Self::Value {
restart: restart.unwrap_or_default(),
})
}
}
d.deserialize_map(PerfectTaikoVisitor)
}
}
impl Serialize for PerfectTaiko {
fn serialize<S: Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
let field_count = self.restart.is_some() as usize;
let mut map = s.serialize_map(Some(field_count))?;
if let Some(ref x) = self.restart {
map.serialize_entry("restart", x)?;
}
map.end()
}
}
impl<'de> Deserialize<'de> for DoubleTimeTaiko {
fn deserialize<D: Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct DoubleTimeTaikoVisitor;
impl<'de> Visitor<'de> for DoubleTimeTaikoVisitor {
type Value = DoubleTimeTaiko;
fn expecting(&self, f: &mut Formatter<'_>) -> FmtResult {
f.write_str("DoubleTimeTaiko")
}
fn visit_map<A: MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
const FIELDS: &'static [&'static str] = &["speed_change", "adjust_pitch"];
let mut speed_change = None;
let mut adjust_pitch = None;
while let Some(key) = map.next_key::<MaybeOwnedStr<'de>>()? {
match key.as_str() {
"speed_change" => speed_change = Some(map.next_value()?),
"adjust_pitch" => adjust_pitch = Some(map.next_value()?),
_ => return Err(DeError::unknown_field(key.as_str(), FIELDS)),
}
}
Ok(Self::Value {
speed_change: speed_change.unwrap_or_default(),
adjust_pitch: adjust_pitch.unwrap_or_default(),
})
}
}
d.deserialize_map(DoubleTimeTaikoVisitor)
}
}
impl Serialize for DoubleTimeTaiko {
fn serialize<S: Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
let field_count =
self.speed_change.is_some() as usize + self.adjust_pitch.is_some() as usize;
let mut map = s.serialize_map(Some(field_count))?;
if let Some(ref x) = self.speed_change {
map.serialize_entry("speed_change", x)?;
}
if let Some(ref x) = self.adjust_pitch {
map.serialize_entry("adjust_pitch", x)?;
}
map.end()
}
}
impl<'de> Deserialize<'de> for NightcoreTaiko {
fn deserialize<D: Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct NightcoreTaikoVisitor;
impl<'de> Visitor<'de> for NightcoreTaikoVisitor {
type Value = NightcoreTaiko;
fn expecting(&self, f: &mut Formatter<'_>) -> FmtResult {
f.write_str("NightcoreTaiko")
}
fn visit_map<A: MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
const FIELDS: &'static [&'static str] = &["speed_change"];
let mut speed_change = None;
while let Some(key) = map.next_key::<MaybeOwnedStr<'de>>()? {
match key.as_str() {
"speed_change" => speed_change = Some(map.next_value()?),
_ => return Err(DeError::unknown_field(key.as_str(), FIELDS)),
}
}
Ok(Self::Value {
speed_change: speed_change.unwrap_or_default(),
})
}
}
d.deserialize_map(NightcoreTaikoVisitor)
}
}
impl Serialize for NightcoreTaiko {
fn serialize<S: Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
let field_count = self.speed_change.is_some() as usize;
let mut map = s.serialize_map(Some(field_count))?;
if let Some(ref x) = self.speed_change {
map.serialize_entry("speed_change", x)?;
}
map.end()
}
}
impl<'de> Deserialize<'de> for HiddenTaiko {
fn deserialize<D: Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct HiddenTaikoVisitor;
impl<'de> Visitor<'de> for HiddenTaikoVisitor {
type Value = HiddenTaiko;
fn expecting(&self, f: &mut Formatter<'_>) -> FmtResult {
f.write_str("HiddenTaiko")
}
fn visit_map<A: MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
const FIELDS: &'static [&'static str] = &[];
while let Some(key) = map.next_key::<MaybeOwnedStr<'de>>()? {
match key.as_str() {
_ => return Err(DeError::unknown_field(key.as_str(), FIELDS)),
}
}
Ok(Self::Value {})
}
}
d.deserialize_map(HiddenTaikoVisitor)
}
}
impl Serialize for HiddenTaiko {
fn serialize<S: Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
let field_count = 0;
let map = s.serialize_map(Some(field_count))?;
map.end()
}
}
impl<'de> Deserialize<'de> for FlashlightTaiko {
fn deserialize<D: Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct FlashlightTaikoVisitor;
impl<'de> Visitor<'de> for FlashlightTaikoVisitor {
type Value = FlashlightTaiko;
fn expecting(&self, f: &mut Formatter<'_>) -> FmtResult {
f.write_str("FlashlightTaiko")
}
fn visit_map<A: MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
const FIELDS: &'static [&'static str] =
&["size_multiplier", "combo_based_size"];
let mut size_multiplier = None;
let mut combo_based_size = None;
while let Some(key) = map.next_key::<MaybeOwnedStr<'de>>()? {
match key.as_str() {
"size_multiplier" => size_multiplier = Some(map.next_value()?),
"combo_based_size" => combo_based_size = Some(map.next_value()?),
_ => return Err(DeError::unknown_field(key.as_str(), FIELDS)),
}
}
Ok(Self::Value {
size_multiplier: size_multiplier.unwrap_or_default(),
combo_based_size: combo_based_size.unwrap_or_default(),
})
}
}
d.deserialize_map(FlashlightTaikoVisitor)
}
}
impl Serialize for FlashlightTaiko {
fn serialize<S: Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
let field_count =
self.size_multiplier.is_some() as usize + self.combo_based_size.is_some() as usize;
let mut map = s.serialize_map(Some(field_count))?;
if let Some(ref x) = self.size_multiplier {
map.serialize_entry("size_multiplier", x)?;
}
if let Some(ref x) = self.combo_based_size {
map.serialize_entry("combo_based_size", x)?;
}
map.end()
}
}
impl<'de> Deserialize<'de> for AccuracyChallengeTaiko {
fn deserialize<D: Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct AccuracyChallengeTaikoVisitor;
impl<'de> Visitor<'de> for AccuracyChallengeTaikoVisitor {
type Value = AccuracyChallengeTaiko;
fn expecting(&self, f: &mut Formatter<'_>) -> FmtResult {
f.write_str("AccuracyChallengeTaiko")
}
fn visit_map<A: MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
const FIELDS: &'static [&'static str] =
&["minimum_accuracy", "accuracy_judge_mode", "restart"];
let mut minimum_accuracy = None;
let mut accuracy_judge_mode = None;
let mut restart = None;
while let Some(key) = map.next_key::<MaybeOwnedStr<'de>>()? {
match key.as_str() {
"minimum_accuracy" => minimum_accuracy = Some(map.next_value()?),
"accuracy_judge_mode" => accuracy_judge_mode = Some(map.next_value()?),
"restart" => restart = Some(map.next_value()?),
_ => return Err(DeError::unknown_field(key.as_str(), FIELDS)),
}
}
Ok(Self::Value {
minimum_accuracy: minimum_accuracy.unwrap_or_default(),
accuracy_judge_mode: accuracy_judge_mode.unwrap_or_default(),
restart: restart.unwrap_or_default(),
})
}
}
d.deserialize_map(AccuracyChallengeTaikoVisitor)
}
}
impl Serialize for AccuracyChallengeTaiko {
fn serialize<S: Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
let field_count = self.minimum_accuracy.is_some() as usize
+ self.accuracy_judge_mode.is_some() as usize
+ self.restart.is_some() as usize;
let mut map = s.serialize_map(Some(field_count))?;
if let Some(ref x) = self.minimum_accuracy {
map.serialize_entry("minimum_accuracy", x)?;
}
if let Some(ref x) = self.accuracy_judge_mode {
map.serialize_entry("accuracy_judge_mode", x)?;
}
if let Some(ref x) = self.restart {
map.serialize_entry("restart", x)?;
}
map.end()
}
}
impl<'de> Deserialize<'de> for RandomTaiko {
fn deserialize<D: Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct RandomTaikoVisitor;
impl<'de> Visitor<'de> for RandomTaikoVisitor {
type Value = RandomTaiko;
fn expecting(&self, f: &mut Formatter<'_>) -> FmtResult {
f.write_str("RandomTaiko")
}
fn visit_map<A: MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
const FIELDS: &'static [&'static str] = &["seed"];
let mut seed = None;
while let Some(key) = map.next_key::<MaybeOwnedStr<'de>>()? {
match key.as_str() {
"seed" => seed = Some(map.next_value()?),
_ => return Err(DeError::unknown_field(key.as_str(), FIELDS)),
}
}
Ok(Self::Value {
seed: seed.unwrap_or_default(),
})
}
}
d.deserialize_map(RandomTaikoVisitor)
}
}
impl Serialize for RandomTaiko {
fn serialize<S: Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
let field_count = self.seed.is_some() as usize;
let mut map = s.serialize_map(Some(field_count))?;
if let Some(ref x) = self.seed {
map.serialize_entry("seed", x)?;
}
map.end()
}
}
impl<'de> Deserialize<'de> for DifficultyAdjustTaiko {
fn deserialize<D: Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct DifficultyAdjustTaikoVisitor;
impl<'de> Visitor<'de> for DifficultyAdjustTaikoVisitor {
type Value = DifficultyAdjustTaiko;
fn expecting(&self, f: &mut Formatter<'_>) -> FmtResult {
f.write_str("DifficultyAdjustTaiko")
}
fn visit_map<A: MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
const FIELDS: &'static [&'static str] = &[
"scroll_speed",
"drain_rate",
"overall_difficulty",
"extended_limits",
];
let mut scroll_speed = None;
let mut drain_rate = None;
let mut overall_difficulty = None;
let mut extended_limits = None;
while let Some(key) = map.next_key::<MaybeOwnedStr<'de>>()? {
match key.as_str() {
"scroll_speed" => scroll_speed = Some(map.next_value()?),
"drain_rate" => drain_rate = Some(map.next_value()?),
"overall_difficulty" => overall_difficulty = Some(map.next_value()?),
"extended_limits" => extended_limits = Some(map.next_value()?),
_ => return Err(DeError::unknown_field(key.as_str(), FIELDS)),
}
}
Ok(Self::Value {
scroll_speed: scroll_speed.unwrap_or_default(),
drain_rate: drain_rate.unwrap_or_default(),
overall_difficulty: overall_difficulty.unwrap_or_default(),
extended_limits: extended_limits.unwrap_or_default(),
})
}
}
d.deserialize_map(DifficultyAdjustTaikoVisitor)
}
}
impl Serialize for DifficultyAdjustTaiko {
fn serialize<S: Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
let field_count = self.scroll_speed.is_some() as usize
+ self.drain_rate.is_some() as usize
+ self.overall_difficulty.is_some() as usize
+ self.extended_limits.is_some() as usize;
let mut map = s.serialize_map(Some(field_count))?;
if let Some(ref x) = self.scroll_speed {
map.serialize_entry("scroll_speed", x)?;
}
if let Some(ref x) = self.drain_rate {
map.serialize_entry("drain_rate", x)?;
}
if let Some(ref x) = self.overall_difficulty {
map.serialize_entry("overall_difficulty", x)?;
}
if let Some(ref x) = self.extended_limits {
map.serialize_entry("extended_limits", x)?;
}
map.end()
}
}
impl<'de> Deserialize<'de> for ClassicTaiko {
fn deserialize<D: Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct ClassicTaikoVisitor;
impl<'de> Visitor<'de> for ClassicTaikoVisitor {
type Value = ClassicTaiko;
fn expecting(&self, f: &mut Formatter<'_>) -> FmtResult {
f.write_str("ClassicTaiko")
}
fn visit_map<A: MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
const FIELDS: &'static [&'static str] = &[];
while let Some(key) = map.next_key::<MaybeOwnedStr<'de>>()? {
match key.as_str() {
_ => return Err(DeError::unknown_field(key.as_str(), FIELDS)),
}
}
Ok(Self::Value {})
}
}
d.deserialize_map(ClassicTaikoVisitor)
}
}
impl Serialize for ClassicTaiko {
fn serialize<S: Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
let field_count = 0;
let map = s.serialize_map(Some(field_count))?;
map.end()
}
}
impl<'de> Deserialize<'de> for SwapTaiko {
fn deserialize<D: Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct SwapTaikoVisitor;
impl<'de> Visitor<'de> for SwapTaikoVisitor {
type Value = SwapTaiko;
fn expecting(&self, f: &mut Formatter<'_>) -> FmtResult {
f.write_str("SwapTaiko")
}
fn visit_map<A: MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
const FIELDS: &'static [&'static str] = &[];
while let Some(key) = map.next_key::<MaybeOwnedStr<'de>>()? {
match key.as_str() {
_ => return Err(DeError::unknown_field(key.as_str(), FIELDS)),
}
}
Ok(Self::Value {})
}
}
d.deserialize_map(SwapTaikoVisitor)
}
}
impl Serialize for SwapTaiko {
fn serialize<S: Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
let field_count = 0;
let map = s.serialize_map(Some(field_count))?;
map.end()
}
}
impl<'de> Deserialize<'de> for SingleTapTaiko {
fn deserialize<D: Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct SingleTapTaikoVisitor;
impl<'de> Visitor<'de> for SingleTapTaikoVisitor {
type Value = SingleTapTaiko;
fn expecting(&self, f: &mut Formatter<'_>) -> FmtResult {
f.write_str("SingleTapTaiko")
}
fn visit_map<A: MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
const FIELDS: &'static [&'static str] = &[];
while let Some(key) = map.next_key::<MaybeOwnedStr<'de>>()? {
match key.as_str() {
_ => return Err(DeError::unknown_field(key.as_str(), FIELDS)),
}
}
Ok(Self::Value {})
}
}
d.deserialize_map(SingleTapTaikoVisitor)
}
}
impl Serialize for SingleTapTaiko {
fn serialize<S: Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
let field_count = 0;
let map = s.serialize_map(Some(field_count))?;
map.end()
}
}
impl<'de> Deserialize<'de> for ConstantSpeedTaiko {
fn deserialize<D: Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct ConstantSpeedTaikoVisitor;
impl<'de> Visitor<'de> for ConstantSpeedTaikoVisitor {
type Value = ConstantSpeedTaiko;
fn expecting(&self, f: &mut Formatter<'_>) -> FmtResult {
f.write_str("ConstantSpeedTaiko")
}
fn visit_map<A: MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
const FIELDS: &'static [&'static str] = &[];
while let Some(key) = map.next_key::<MaybeOwnedStr<'de>>()? {
match key.as_str() {
_ => return Err(DeError::unknown_field(key.as_str(), FIELDS)),
}
}
Ok(Self::Value {})
}
}
d.deserialize_map(ConstantSpeedTaikoVisitor)
}
}
impl Serialize for ConstantSpeedTaiko {
fn serialize<S: Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
let field_count = 0;
let map = s.serialize_map(Some(field_count))?;
map.end()
}
}
impl<'de> Deserialize<'de> for AutoplayTaiko {
fn deserialize<D: Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct AutoplayTaikoVisitor;
impl<'de> Visitor<'de> for AutoplayTaikoVisitor {
type Value = AutoplayTaiko;
fn expecting(&self, f: &mut Formatter<'_>) -> FmtResult {
f.write_str("AutoplayTaiko")
}
fn visit_map<A: MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
const FIELDS: &'static [&'static str] = &[];
while let Some(key) = map.next_key::<MaybeOwnedStr<'de>>()? {
match key.as_str() {
_ => return Err(DeError::unknown_field(key.as_str(), FIELDS)),
}
}
Ok(Self::Value {})
}
}
d.deserialize_map(AutoplayTaikoVisitor)
}
}
impl Serialize for AutoplayTaiko {
fn serialize<S: Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
let field_count = 0;
let map = s.serialize_map(Some(field_count))?;
map.end()
}
}
impl<'de> Deserialize<'de> for CinemaTaiko {
fn deserialize<D: Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct CinemaTaikoVisitor;
impl<'de> Visitor<'de> for CinemaTaikoVisitor {
type Value = CinemaTaiko;
fn expecting(&self, f: &mut Formatter<'_>) -> FmtResult {
f.write_str("CinemaTaiko")
}
fn visit_map<A: MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
const FIELDS: &'static [&'static str] = &[];
while let Some(key) = map.next_key::<MaybeOwnedStr<'de>>()? {
match key.as_str() {
_ => return Err(DeError::unknown_field(key.as_str(), FIELDS)),
}
}
Ok(Self::Value {})
}
}
d.deserialize_map(CinemaTaikoVisitor)
}
}
impl Serialize for CinemaTaiko {
fn serialize<S: Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
let field_count = 0;
let map = s.serialize_map(Some(field_count))?;
map.end()
}
}
impl<'de> Deserialize<'de> for RelaxTaiko {
fn deserialize<D: Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct RelaxTaikoVisitor;
impl<'de> Visitor<'de> for RelaxTaikoVisitor {
type Value = RelaxTaiko;
fn expecting(&self, f: &mut Formatter<'_>) -> FmtResult {
f.write_str("RelaxTaiko")
}
fn visit_map<A: MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
const FIELDS: &'static [&'static str] = &[];
while let Some(key) = map.next_key::<MaybeOwnedStr<'de>>()? {
match key.as_str() {
_ => return Err(DeError::unknown_field(key.as_str(), FIELDS)),
}
}
Ok(Self::Value {})
}
}
d.deserialize_map(RelaxTaikoVisitor)
}
}
impl Serialize for RelaxTaiko {
fn serialize<S: Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
let field_count = 0;
let map = s.serialize_map(Some(field_count))?;
map.end()
}
}
impl<'de> Deserialize<'de> for WindUpTaiko {
fn deserialize<D: Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct WindUpTaikoVisitor;
impl<'de> Visitor<'de> for WindUpTaikoVisitor {
type Value = WindUpTaiko;
fn expecting(&self, f: &mut Formatter<'_>) -> FmtResult {
f.write_str("WindUpTaiko")
}
fn visit_map<A: MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
const FIELDS: &'static [&'static str] =
&["initial_rate", "final_rate", "adjust_pitch"];
let mut initial_rate = None;
let mut final_rate = None;
let mut adjust_pitch = None;
while let Some(key) = map.next_key::<MaybeOwnedStr<'de>>()? {
match key.as_str() {
"initial_rate" => initial_rate = Some(map.next_value()?),
"final_rate" => final_rate = Some(map.next_value()?),
"adjust_pitch" => adjust_pitch = Some(map.next_value()?),
_ => return Err(DeError::unknown_field(key.as_str(), FIELDS)),
}
}
Ok(Self::Value {
initial_rate: initial_rate.unwrap_or_default(),
final_rate: final_rate.unwrap_or_default(),
adjust_pitch: adjust_pitch.unwrap_or_default(),
})
}
}
d.deserialize_map(WindUpTaikoVisitor)
}
}
impl Serialize for WindUpTaiko {
fn serialize<S: Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
let field_count = self.initial_rate.is_some() as usize
+ self.final_rate.is_some() as usize
+ self.adjust_pitch.is_some() as usize;
let mut map = s.serialize_map(Some(field_count))?;
if let Some(ref x) = self.initial_rate {
map.serialize_entry("initial_rate", x)?;
}
if let Some(ref x) = self.final_rate {
map.serialize_entry("final_rate", x)?;
}
if let Some(ref x) = self.adjust_pitch {
map.serialize_entry("adjust_pitch", x)?;
}
map.end()
}
}
impl<'de> Deserialize<'de> for WindDownTaiko {
fn deserialize<D: Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct WindDownTaikoVisitor;
impl<'de> Visitor<'de> for WindDownTaikoVisitor {
type Value = WindDownTaiko;
fn expecting(&self, f: &mut Formatter<'_>) -> FmtResult {
f.write_str("WindDownTaiko")
}
fn visit_map<A: MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
const FIELDS: &'static [&'static str] =
&["initial_rate", "final_rate", "adjust_pitch"];
let mut initial_rate = None;
let mut final_rate = None;
let mut adjust_pitch = None;
while let Some(key) = map.next_key::<MaybeOwnedStr<'de>>()? {
match key.as_str() {
"initial_rate" => initial_rate = Some(map.next_value()?),
"final_rate" => final_rate = Some(map.next_value()?),
"adjust_pitch" => adjust_pitch = Some(map.next_value()?),
_ => return Err(DeError::unknown_field(key.as_str(), FIELDS)),
}
}
Ok(Self::Value {
initial_rate: initial_rate.unwrap_or_default(),
final_rate: final_rate.unwrap_or_default(),
adjust_pitch: adjust_pitch.unwrap_or_default(),
})
}
}
d.deserialize_map(WindDownTaikoVisitor)
}
}
impl Serialize for WindDownTaiko {
fn serialize<S: Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
let field_count = self.initial_rate.is_some() as usize
+ self.final_rate.is_some() as usize
+ self.adjust_pitch.is_some() as usize;
let mut map = s.serialize_map(Some(field_count))?;
if let Some(ref x) = self.initial_rate {
map.serialize_entry("initial_rate", x)?;
}
if let Some(ref x) = self.final_rate {
map.serialize_entry("final_rate", x)?;
}
if let Some(ref x) = self.adjust_pitch {
map.serialize_entry("adjust_pitch", x)?;
}
map.end()
}
}
impl<'de> Deserialize<'de> for MutedTaiko {
fn deserialize<D: Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct MutedTaikoVisitor;
impl<'de> Visitor<'de> for MutedTaikoVisitor {
type Value = MutedTaiko;
fn expecting(&self, f: &mut Formatter<'_>) -> FmtResult {
f.write_str("MutedTaiko")
}
fn visit_map<A: MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
const FIELDS: &'static [&'static str] = &[
"inverse_muting",
"enable_metronome",
"mute_combo_count",
"affects_hit_sounds",
];
let mut inverse_muting = None;
let mut enable_metronome = None;
let mut mute_combo_count = None;
let mut affects_hit_sounds = None;
while let Some(key) = map.next_key::<MaybeOwnedStr<'de>>()? {
match key.as_str() {
"inverse_muting" => inverse_muting = Some(map.next_value()?),
"enable_metronome" => enable_metronome = Some(map.next_value()?),
"mute_combo_count" => mute_combo_count = Some(map.next_value()?),
"affects_hit_sounds" => affects_hit_sounds = Some(map.next_value()?),
_ => return Err(DeError::unknown_field(key.as_str(), FIELDS)),
}
}
Ok(Self::Value {
inverse_muting: inverse_muting.unwrap_or_default(),
enable_metronome: enable_metronome.unwrap_or_default(),
mute_combo_count: mute_combo_count.unwrap_or_default(),
affects_hit_sounds: affects_hit_sounds.unwrap_or_default(),
})
}
}
d.deserialize_map(MutedTaikoVisitor)
}
}
impl Serialize for MutedTaiko {
fn serialize<S: Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
let field_count = self.inverse_muting.is_some() as usize
+ self.enable_metronome.is_some() as usize
+ self.mute_combo_count.is_some() as usize
+ self.affects_hit_sounds.is_some() as usize;
let mut map = s.serialize_map(Some(field_count))?;
if let Some(ref x) = self.inverse_muting {
map.serialize_entry("inverse_muting", x)?;
}
if let Some(ref x) = self.enable_metronome {
map.serialize_entry("enable_metronome", x)?;
}
if let Some(ref x) = self.mute_combo_count {
map.serialize_entry("mute_combo_count", x)?;
}
if let Some(ref x) = self.affects_hit_sounds {
map.serialize_entry("affects_hit_sounds", x)?;
}
map.end()
}
}
impl<'de> Deserialize<'de> for AdaptiveSpeedTaiko {
fn deserialize<D: Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct AdaptiveSpeedTaikoVisitor;
impl<'de> Visitor<'de> for AdaptiveSpeedTaikoVisitor {
type Value = AdaptiveSpeedTaiko;
fn expecting(&self, f: &mut Formatter<'_>) -> FmtResult {
f.write_str("AdaptiveSpeedTaiko")
}
fn visit_map<A: MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
const FIELDS: &'static [&'static str] = &["initial_rate", "adjust_pitch"];
let mut initial_rate = None;
let mut adjust_pitch = None;
while let Some(key) = map.next_key::<MaybeOwnedStr<'de>>()? {
match key.as_str() {
"initial_rate" => initial_rate = Some(map.next_value()?),
"adjust_pitch" => adjust_pitch = Some(map.next_value()?),
_ => return Err(DeError::unknown_field(key.as_str(), FIELDS)),
}
}
Ok(Self::Value {
initial_rate: initial_rate.unwrap_or_default(),
adjust_pitch: adjust_pitch.unwrap_or_default(),
})
}
}
d.deserialize_map(AdaptiveSpeedTaikoVisitor)
}
}
impl Serialize for AdaptiveSpeedTaiko {
fn serialize<S: Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
let field_count =
self.initial_rate.is_some() as usize + self.adjust_pitch.is_some() as usize;
let mut map = s.serialize_map(Some(field_count))?;
if let Some(ref x) = self.initial_rate {
map.serialize_entry("initial_rate", x)?;
}
if let Some(ref x) = self.adjust_pitch {
map.serialize_entry("adjust_pitch", x)?;
}
map.end()
}
}
impl<'de> Deserialize<'de> for ScoreV2Taiko {
fn deserialize<D: Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct ScoreV2TaikoVisitor;
impl<'de> Visitor<'de> for ScoreV2TaikoVisitor {
type Value = ScoreV2Taiko;
fn expecting(&self, f: &mut Formatter<'_>) -> FmtResult {
f.write_str("ScoreV2Taiko")
}
fn visit_map<A: MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
const FIELDS: &'static [&'static str] = &[];
while let Some(key) = map.next_key::<MaybeOwnedStr<'de>>()? {
match key.as_str() {
_ => return Err(DeError::unknown_field(key.as_str(), FIELDS)),
}
}
Ok(Self::Value {})
}
}
d.deserialize_map(ScoreV2TaikoVisitor)
}
}
impl Serialize for ScoreV2Taiko {
fn serialize<S: Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
let field_count = 0;
let map = s.serialize_map(Some(field_count))?;
map.end()
}
}
impl<'de> Deserialize<'de> for EasyCatch {
fn deserialize<D: Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct EasyCatchVisitor;
impl<'de> Visitor<'de> for EasyCatchVisitor {
type Value = EasyCatch;
fn expecting(&self, f: &mut Formatter<'_>) -> FmtResult {
f.write_str("EasyCatch")
}
fn visit_map<A: MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
const FIELDS: &'static [&'static str] = &["retries"];
let mut retries = None;
while let Some(key) = map.next_key::<MaybeOwnedStr<'de>>()? {
match key.as_str() {
"retries" => retries = Some(map.next_value()?),
_ => return Err(DeError::unknown_field(key.as_str(), FIELDS)),
}
}
Ok(Self::Value {
retries: retries.unwrap_or_default(),
})
}
}
d.deserialize_map(EasyCatchVisitor)
}
}
impl Serialize for EasyCatch {
fn serialize<S: Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
let field_count = self.retries.is_some() as usize;
let mut map = s.serialize_map(Some(field_count))?;
if let Some(ref x) = self.retries {
map.serialize_entry("retries", x)?;
}
map.end()
}
}
impl<'de> Deserialize<'de> for NoFailCatch {
fn deserialize<D: Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct NoFailCatchVisitor;
impl<'de> Visitor<'de> for NoFailCatchVisitor {
type Value = NoFailCatch;
fn expecting(&self, f: &mut Formatter<'_>) -> FmtResult {
f.write_str("NoFailCatch")
}
fn visit_map<A: MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
const FIELDS: &'static [&'static str] = &[];
while let Some(key) = map.next_key::<MaybeOwnedStr<'de>>()? {
match key.as_str() {
_ => return Err(DeError::unknown_field(key.as_str(), FIELDS)),
}
}
Ok(Self::Value {})
}
}
d.deserialize_map(NoFailCatchVisitor)
}
}
impl Serialize for NoFailCatch {
fn serialize<S: Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
let field_count = 0;
let map = s.serialize_map(Some(field_count))?;
map.end()
}
}
impl<'de> Deserialize<'de> for HalfTimeCatch {
fn deserialize<D: Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct HalfTimeCatchVisitor;
impl<'de> Visitor<'de> for HalfTimeCatchVisitor {
type Value = HalfTimeCatch;
fn expecting(&self, f: &mut Formatter<'_>) -> FmtResult {
f.write_str("HalfTimeCatch")
}
fn visit_map<A: MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
const FIELDS: &'static [&'static str] = &["speed_change", "adjust_pitch"];
let mut speed_change = None;
let mut adjust_pitch = None;
while let Some(key) = map.next_key::<MaybeOwnedStr<'de>>()? {
match key.as_str() {
"speed_change" => speed_change = Some(map.next_value()?),
"adjust_pitch" => adjust_pitch = Some(map.next_value()?),
_ => return Err(DeError::unknown_field(key.as_str(), FIELDS)),
}
}
Ok(Self::Value {
speed_change: speed_change.unwrap_or_default(),
adjust_pitch: adjust_pitch.unwrap_or_default(),
})
}
}
d.deserialize_map(HalfTimeCatchVisitor)
}
}
impl Serialize for HalfTimeCatch {
fn serialize<S: Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
let field_count =
self.speed_change.is_some() as usize + self.adjust_pitch.is_some() as usize;
let mut map = s.serialize_map(Some(field_count))?;
if let Some(ref x) = self.speed_change {
map.serialize_entry("speed_change", x)?;
}
if let Some(ref x) = self.adjust_pitch {
map.serialize_entry("adjust_pitch", x)?;
}
map.end()
}
}
impl<'de> Deserialize<'de> for DaycoreCatch {
fn deserialize<D: Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct DaycoreCatchVisitor;
impl<'de> Visitor<'de> for DaycoreCatchVisitor {
type Value = DaycoreCatch;
fn expecting(&self, f: &mut Formatter<'_>) -> FmtResult {
f.write_str("DaycoreCatch")
}
fn visit_map<A: MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
const FIELDS: &'static [&'static str] = &["speed_change"];
let mut speed_change = None;
while let Some(key) = map.next_key::<MaybeOwnedStr<'de>>()? {
match key.as_str() {
"speed_change" => speed_change = Some(map.next_value()?),
_ => return Err(DeError::unknown_field(key.as_str(), FIELDS)),
}
}
Ok(Self::Value {
speed_change: speed_change.unwrap_or_default(),
})
}
}
d.deserialize_map(DaycoreCatchVisitor)
}
}
impl Serialize for DaycoreCatch {
fn serialize<S: Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
let field_count = self.speed_change.is_some() as usize;
let mut map = s.serialize_map(Some(field_count))?;
if let Some(ref x) = self.speed_change {
map.serialize_entry("speed_change", x)?;
}
map.end()
}
}
impl<'de> Deserialize<'de> for HardRockCatch {
fn deserialize<D: Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct HardRockCatchVisitor;
impl<'de> Visitor<'de> for HardRockCatchVisitor {
type Value = HardRockCatch;
fn expecting(&self, f: &mut Formatter<'_>) -> FmtResult {
f.write_str("HardRockCatch")
}
fn visit_map<A: MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
const FIELDS: &'static [&'static str] = &[];
while let Some(key) = map.next_key::<MaybeOwnedStr<'de>>()? {
match key.as_str() {
_ => return Err(DeError::unknown_field(key.as_str(), FIELDS)),
}
}
Ok(Self::Value {})
}
}
d.deserialize_map(HardRockCatchVisitor)
}
}
impl Serialize for HardRockCatch {
fn serialize<S: Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
let field_count = 0;
let map = s.serialize_map(Some(field_count))?;
map.end()
}
}
impl<'de> Deserialize<'de> for SuddenDeathCatch {
fn deserialize<D: Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct SuddenDeathCatchVisitor;
impl<'de> Visitor<'de> for SuddenDeathCatchVisitor {
type Value = SuddenDeathCatch;
fn expecting(&self, f: &mut Formatter<'_>) -> FmtResult {
f.write_str("SuddenDeathCatch")
}
fn visit_map<A: MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
const FIELDS: &'static [&'static str] = &["restart"];
let mut restart = None;
while let Some(key) = map.next_key::<MaybeOwnedStr<'de>>()? {
match key.as_str() {
"restart" => restart = Some(map.next_value()?),
_ => return Err(DeError::unknown_field(key.as_str(), FIELDS)),
}
}
Ok(Self::Value {
restart: restart.unwrap_or_default(),
})
}
}
d.deserialize_map(SuddenDeathCatchVisitor)
}
}
impl Serialize for SuddenDeathCatch {
fn serialize<S: Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
let field_count = self.restart.is_some() as usize;
let mut map = s.serialize_map(Some(field_count))?;
if let Some(ref x) = self.restart {
map.serialize_entry("restart", x)?;
}
map.end()
}
}
impl<'de> Deserialize<'de> for PerfectCatch {
fn deserialize<D: Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct PerfectCatchVisitor;
impl<'de> Visitor<'de> for PerfectCatchVisitor {
type Value = PerfectCatch;
fn expecting(&self, f: &mut Formatter<'_>) -> FmtResult {
f.write_str("PerfectCatch")
}
fn visit_map<A: MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
const FIELDS: &'static [&'static str] = &["restart"];
let mut restart = None;
while let Some(key) = map.next_key::<MaybeOwnedStr<'de>>()? {
match key.as_str() {
"restart" => restart = Some(map.next_value()?),
_ => return Err(DeError::unknown_field(key.as_str(), FIELDS)),
}
}
Ok(Self::Value {
restart: restart.unwrap_or_default(),
})
}
}
d.deserialize_map(PerfectCatchVisitor)
}
}
impl Serialize for PerfectCatch {
fn serialize<S: Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
let field_count = self.restart.is_some() as usize;
let mut map = s.serialize_map(Some(field_count))?;
if let Some(ref x) = self.restart {
map.serialize_entry("restart", x)?;
}
map.end()
}
}
impl<'de> Deserialize<'de> for DoubleTimeCatch {
fn deserialize<D: Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct DoubleTimeCatchVisitor;
impl<'de> Visitor<'de> for DoubleTimeCatchVisitor {
type Value = DoubleTimeCatch;
fn expecting(&self, f: &mut Formatter<'_>) -> FmtResult {
f.write_str("DoubleTimeCatch")
}
fn visit_map<A: MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
const FIELDS: &'static [&'static str] = &["speed_change", "adjust_pitch"];
let mut speed_change = None;
let mut adjust_pitch = None;
while let Some(key) = map.next_key::<MaybeOwnedStr<'de>>()? {
match key.as_str() {
"speed_change" => speed_change = Some(map.next_value()?),
"adjust_pitch" => adjust_pitch = Some(map.next_value()?),
_ => return Err(DeError::unknown_field(key.as_str(), FIELDS)),
}
}
Ok(Self::Value {
speed_change: speed_change.unwrap_or_default(),
adjust_pitch: adjust_pitch.unwrap_or_default(),
})
}
}
d.deserialize_map(DoubleTimeCatchVisitor)
}
}
impl Serialize for DoubleTimeCatch {
fn serialize<S: Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
let field_count =
self.speed_change.is_some() as usize + self.adjust_pitch.is_some() as usize;
let mut map = s.serialize_map(Some(field_count))?;
if let Some(ref x) = self.speed_change {
map.serialize_entry("speed_change", x)?;
}
if let Some(ref x) = self.adjust_pitch {
map.serialize_entry("adjust_pitch", x)?;
}
map.end()
}
}
impl<'de> Deserialize<'de> for NightcoreCatch {
fn deserialize<D: Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct NightcoreCatchVisitor;
impl<'de> Visitor<'de> for NightcoreCatchVisitor {
type Value = NightcoreCatch;
fn expecting(&self, f: &mut Formatter<'_>) -> FmtResult {
f.write_str("NightcoreCatch")
}
fn visit_map<A: MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
const FIELDS: &'static [&'static str] = &["speed_change"];
let mut speed_change = None;
while let Some(key) = map.next_key::<MaybeOwnedStr<'de>>()? {
match key.as_str() {
"speed_change" => speed_change = Some(map.next_value()?),
_ => return Err(DeError::unknown_field(key.as_str(), FIELDS)),
}
}
Ok(Self::Value {
speed_change: speed_change.unwrap_or_default(),
})
}
}
d.deserialize_map(NightcoreCatchVisitor)
}
}
impl Serialize for NightcoreCatch {
fn serialize<S: Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
let field_count = self.speed_change.is_some() as usize;
let mut map = s.serialize_map(Some(field_count))?;
if let Some(ref x) = self.speed_change {
map.serialize_entry("speed_change", x)?;
}
map.end()
}
}
impl<'de> Deserialize<'de> for HiddenCatch {
fn deserialize<D: Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct HiddenCatchVisitor;
impl<'de> Visitor<'de> for HiddenCatchVisitor {
type Value = HiddenCatch;
fn expecting(&self, f: &mut Formatter<'_>) -> FmtResult {
f.write_str("HiddenCatch")
}
fn visit_map<A: MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
const FIELDS: &'static [&'static str] = &[];
while let Some(key) = map.next_key::<MaybeOwnedStr<'de>>()? {
match key.as_str() {
_ => return Err(DeError::unknown_field(key.as_str(), FIELDS)),
}
}
Ok(Self::Value {})
}
}
d.deserialize_map(HiddenCatchVisitor)
}
}
impl Serialize for HiddenCatch {
fn serialize<S: Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
let field_count = 0;
let map = s.serialize_map(Some(field_count))?;
map.end()
}
}
impl<'de> Deserialize<'de> for FlashlightCatch {
fn deserialize<D: Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct FlashlightCatchVisitor;
impl<'de> Visitor<'de> for FlashlightCatchVisitor {
type Value = FlashlightCatch;
fn expecting(&self, f: &mut Formatter<'_>) -> FmtResult {
f.write_str("FlashlightCatch")
}
fn visit_map<A: MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
const FIELDS: &'static [&'static str] =
&["size_multiplier", "combo_based_size"];
let mut size_multiplier = None;
let mut combo_based_size = None;
while let Some(key) = map.next_key::<MaybeOwnedStr<'de>>()? {
match key.as_str() {
"size_multiplier" => size_multiplier = Some(map.next_value()?),
"combo_based_size" => combo_based_size = Some(map.next_value()?),
_ => return Err(DeError::unknown_field(key.as_str(), FIELDS)),
}
}
Ok(Self::Value {
size_multiplier: size_multiplier.unwrap_or_default(),
combo_based_size: combo_based_size.unwrap_or_default(),
})
}
}
d.deserialize_map(FlashlightCatchVisitor)
}
}
impl Serialize for FlashlightCatch {
fn serialize<S: Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
let field_count =
self.size_multiplier.is_some() as usize + self.combo_based_size.is_some() as usize;
let mut map = s.serialize_map(Some(field_count))?;
if let Some(ref x) = self.size_multiplier {
map.serialize_entry("size_multiplier", x)?;
}
if let Some(ref x) = self.combo_based_size {
map.serialize_entry("combo_based_size", x)?;
}
map.end()
}
}
impl<'de> Deserialize<'de> for AccuracyChallengeCatch {
fn deserialize<D: Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct AccuracyChallengeCatchVisitor;
impl<'de> Visitor<'de> for AccuracyChallengeCatchVisitor {
type Value = AccuracyChallengeCatch;
fn expecting(&self, f: &mut Formatter<'_>) -> FmtResult {
f.write_str("AccuracyChallengeCatch")
}
fn visit_map<A: MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
const FIELDS: &'static [&'static str] =
&["minimum_accuracy", "accuracy_judge_mode", "restart"];
let mut minimum_accuracy = None;
let mut accuracy_judge_mode = None;
let mut restart = None;
while let Some(key) = map.next_key::<MaybeOwnedStr<'de>>()? {
match key.as_str() {
"minimum_accuracy" => minimum_accuracy = Some(map.next_value()?),
"accuracy_judge_mode" => accuracy_judge_mode = Some(map.next_value()?),
"restart" => restart = Some(map.next_value()?),
_ => return Err(DeError::unknown_field(key.as_str(), FIELDS)),
}
}
Ok(Self::Value {
minimum_accuracy: minimum_accuracy.unwrap_or_default(),
accuracy_judge_mode: accuracy_judge_mode.unwrap_or_default(),
restart: restart.unwrap_or_default(),
})
}
}
d.deserialize_map(AccuracyChallengeCatchVisitor)
}
}
impl Serialize for AccuracyChallengeCatch {
fn serialize<S: Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
let field_count = self.minimum_accuracy.is_some() as usize
+ self.accuracy_judge_mode.is_some() as usize
+ self.restart.is_some() as usize;
let mut map = s.serialize_map(Some(field_count))?;
if let Some(ref x) = self.minimum_accuracy {
map.serialize_entry("minimum_accuracy", x)?;
}
if let Some(ref x) = self.accuracy_judge_mode {
map.serialize_entry("accuracy_judge_mode", x)?;
}
if let Some(ref x) = self.restart {
map.serialize_entry("restart", x)?;
}
map.end()
}
}
impl<'de> Deserialize<'de> for DifficultyAdjustCatch {
fn deserialize<D: Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct DifficultyAdjustCatchVisitor;
impl<'de> Visitor<'de> for DifficultyAdjustCatchVisitor {
type Value = DifficultyAdjustCatch;
fn expecting(&self, f: &mut Formatter<'_>) -> FmtResult {
f.write_str("DifficultyAdjustCatch")
}
fn visit_map<A: MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
const FIELDS: &'static [&'static str] = &[
"circle_size",
"approach_rate",
"hard_rock_offsets",
"drain_rate",
"overall_difficulty",
"extended_limits",
];
let mut circle_size = None;
let mut approach_rate = None;
let mut hard_rock_offsets = None;
let mut drain_rate = None;
let mut overall_difficulty = None;
let mut extended_limits = None;
while let Some(key) = map.next_key::<MaybeOwnedStr<'de>>()? {
match key.as_str() {
"circle_size" => circle_size = Some(map.next_value()?),
"approach_rate" => approach_rate = Some(map.next_value()?),
"hard_rock_offsets" => hard_rock_offsets = Some(map.next_value()?),
"drain_rate" => drain_rate = Some(map.next_value()?),
"overall_difficulty" => overall_difficulty = Some(map.next_value()?),
"extended_limits" => extended_limits = Some(map.next_value()?),
_ => return Err(DeError::unknown_field(key.as_str(), FIELDS)),
}
}
Ok(Self::Value {
circle_size: circle_size.unwrap_or_default(),
approach_rate: approach_rate.unwrap_or_default(),
hard_rock_offsets: hard_rock_offsets.unwrap_or_default(),
drain_rate: drain_rate.unwrap_or_default(),
overall_difficulty: overall_difficulty.unwrap_or_default(),
extended_limits: extended_limits.unwrap_or_default(),
})
}
}
d.deserialize_map(DifficultyAdjustCatchVisitor)
}
}
impl Serialize for DifficultyAdjustCatch {
fn serialize<S: Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
let field_count = self.circle_size.is_some() as usize
+ self.approach_rate.is_some() as usize
+ self.hard_rock_offsets.is_some() as usize
+ self.drain_rate.is_some() as usize
+ self.overall_difficulty.is_some() as usize
+ self.extended_limits.is_some() as usize;
let mut map = s.serialize_map(Some(field_count))?;
if let Some(ref x) = self.circle_size {
map.serialize_entry("circle_size", x)?;
}
if let Some(ref x) = self.approach_rate {
map.serialize_entry("approach_rate", x)?;
}
if let Some(ref x) = self.hard_rock_offsets {
map.serialize_entry("hard_rock_offsets", x)?;
}
if let Some(ref x) = self.drain_rate {
map.serialize_entry("drain_rate", x)?;
}
if let Some(ref x) = self.overall_difficulty {
map.serialize_entry("overall_difficulty", x)?;
}
if let Some(ref x) = self.extended_limits {
map.serialize_entry("extended_limits", x)?;
}
map.end()
}
}
impl<'de> Deserialize<'de> for ClassicCatch {
fn deserialize<D: Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct ClassicCatchVisitor;
impl<'de> Visitor<'de> for ClassicCatchVisitor {
type Value = ClassicCatch;
fn expecting(&self, f: &mut Formatter<'_>) -> FmtResult {
f.write_str("ClassicCatch")
}
fn visit_map<A: MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
const FIELDS: &'static [&'static str] = &[];
while let Some(key) = map.next_key::<MaybeOwnedStr<'de>>()? {
match key.as_str() {
_ => return Err(DeError::unknown_field(key.as_str(), FIELDS)),
}
}
Ok(Self::Value {})
}
}
d.deserialize_map(ClassicCatchVisitor)
}
}
impl Serialize for ClassicCatch {
fn serialize<S: Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
let field_count = 0;
let map = s.serialize_map(Some(field_count))?;
map.end()
}
}
impl<'de> Deserialize<'de> for MirrorCatch {
fn deserialize<D: Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct MirrorCatchVisitor;
impl<'de> Visitor<'de> for MirrorCatchVisitor {
type Value = MirrorCatch;
fn expecting(&self, f: &mut Formatter<'_>) -> FmtResult {
f.write_str("MirrorCatch")
}
fn visit_map<A: MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
const FIELDS: &'static [&'static str] = &[];
while let Some(key) = map.next_key::<MaybeOwnedStr<'de>>()? {
match key.as_str() {
_ => return Err(DeError::unknown_field(key.as_str(), FIELDS)),
}
}
Ok(Self::Value {})
}
}
d.deserialize_map(MirrorCatchVisitor)
}
}
impl Serialize for MirrorCatch {
fn serialize<S: Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
let field_count = 0;
let map = s.serialize_map(Some(field_count))?;
map.end()
}
}
impl<'de> Deserialize<'de> for AutoplayCatch {
fn deserialize<D: Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct AutoplayCatchVisitor;
impl<'de> Visitor<'de> for AutoplayCatchVisitor {
type Value = AutoplayCatch;
fn expecting(&self, f: &mut Formatter<'_>) -> FmtResult {
f.write_str("AutoplayCatch")
}
fn visit_map<A: MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
const FIELDS: &'static [&'static str] = &[];
while let Some(key) = map.next_key::<MaybeOwnedStr<'de>>()? {
match key.as_str() {
_ => return Err(DeError::unknown_field(key.as_str(), FIELDS)),
}
}
Ok(Self::Value {})
}
}
d.deserialize_map(AutoplayCatchVisitor)
}
}
impl Serialize for AutoplayCatch {
fn serialize<S: Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
let field_count = 0;
let map = s.serialize_map(Some(field_count))?;
map.end()
}
}
impl<'de> Deserialize<'de> for CinemaCatch {
fn deserialize<D: Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct CinemaCatchVisitor;
impl<'de> Visitor<'de> for CinemaCatchVisitor {
type Value = CinemaCatch;
fn expecting(&self, f: &mut Formatter<'_>) -> FmtResult {
f.write_str("CinemaCatch")
}
fn visit_map<A: MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
const FIELDS: &'static [&'static str] = &[];
while let Some(key) = map.next_key::<MaybeOwnedStr<'de>>()? {
match key.as_str() {
_ => return Err(DeError::unknown_field(key.as_str(), FIELDS)),
}
}
Ok(Self::Value {})
}
}
d.deserialize_map(CinemaCatchVisitor)
}
}
impl Serialize for CinemaCatch {
fn serialize<S: Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
let field_count = 0;
let map = s.serialize_map(Some(field_count))?;
map.end()
}
}
impl<'de> Deserialize<'de> for RelaxCatch {
fn deserialize<D: Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct RelaxCatchVisitor;
impl<'de> Visitor<'de> for RelaxCatchVisitor {
type Value = RelaxCatch;
fn expecting(&self, f: &mut Formatter<'_>) -> FmtResult {
f.write_str("RelaxCatch")
}
fn visit_map<A: MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
const FIELDS: &'static [&'static str] = &[];
while let Some(key) = map.next_key::<MaybeOwnedStr<'de>>()? {
match key.as_str() {
_ => return Err(DeError::unknown_field(key.as_str(), FIELDS)),
}
}
Ok(Self::Value {})
}
}
d.deserialize_map(RelaxCatchVisitor)
}
}
impl Serialize for RelaxCatch {
fn serialize<S: Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
let field_count = 0;
let map = s.serialize_map(Some(field_count))?;
map.end()
}
}
impl<'de> Deserialize<'de> for WindUpCatch {
fn deserialize<D: Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct WindUpCatchVisitor;
impl<'de> Visitor<'de> for WindUpCatchVisitor {
type Value = WindUpCatch;
fn expecting(&self, f: &mut Formatter<'_>) -> FmtResult {
f.write_str("WindUpCatch")
}
fn visit_map<A: MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
const FIELDS: &'static [&'static str] =
&["initial_rate", "final_rate", "adjust_pitch"];
let mut initial_rate = None;
let mut final_rate = None;
let mut adjust_pitch = None;
while let Some(key) = map.next_key::<MaybeOwnedStr<'de>>()? {
match key.as_str() {
"initial_rate" => initial_rate = Some(map.next_value()?),
"final_rate" => final_rate = Some(map.next_value()?),
"adjust_pitch" => adjust_pitch = Some(map.next_value()?),
_ => return Err(DeError::unknown_field(key.as_str(), FIELDS)),
}
}
Ok(Self::Value {
initial_rate: initial_rate.unwrap_or_default(),
final_rate: final_rate.unwrap_or_default(),
adjust_pitch: adjust_pitch.unwrap_or_default(),
})
}
}
d.deserialize_map(WindUpCatchVisitor)
}
}
impl Serialize for WindUpCatch {
fn serialize<S: Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
let field_count = self.initial_rate.is_some() as usize
+ self.final_rate.is_some() as usize
+ self.adjust_pitch.is_some() as usize;
let mut map = s.serialize_map(Some(field_count))?;
if let Some(ref x) = self.initial_rate {
map.serialize_entry("initial_rate", x)?;
}
if let Some(ref x) = self.final_rate {
map.serialize_entry("final_rate", x)?;
}
if let Some(ref x) = self.adjust_pitch {
map.serialize_entry("adjust_pitch", x)?;
}
map.end()
}
}
impl<'de> Deserialize<'de> for WindDownCatch {
fn deserialize<D: Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct WindDownCatchVisitor;
impl<'de> Visitor<'de> for WindDownCatchVisitor {
type Value = WindDownCatch;
fn expecting(&self, f: &mut Formatter<'_>) -> FmtResult {
f.write_str("WindDownCatch")
}
fn visit_map<A: MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
const FIELDS: &'static [&'static str] =
&["initial_rate", "final_rate", "adjust_pitch"];
let mut initial_rate = None;
let mut final_rate = None;
let mut adjust_pitch = None;
while let Some(key) = map.next_key::<MaybeOwnedStr<'de>>()? {
match key.as_str() {
"initial_rate" => initial_rate = Some(map.next_value()?),
"final_rate" => final_rate = Some(map.next_value()?),
"adjust_pitch" => adjust_pitch = Some(map.next_value()?),
_ => return Err(DeError::unknown_field(key.as_str(), FIELDS)),
}
}
Ok(Self::Value {
initial_rate: initial_rate.unwrap_or_default(),
final_rate: final_rate.unwrap_or_default(),
adjust_pitch: adjust_pitch.unwrap_or_default(),
})
}
}
d.deserialize_map(WindDownCatchVisitor)
}
}
impl Serialize for WindDownCatch {
fn serialize<S: Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
let field_count = self.initial_rate.is_some() as usize
+ self.final_rate.is_some() as usize
+ self.adjust_pitch.is_some() as usize;
let mut map = s.serialize_map(Some(field_count))?;
if let Some(ref x) = self.initial_rate {
map.serialize_entry("initial_rate", x)?;
}
if let Some(ref x) = self.final_rate {
map.serialize_entry("final_rate", x)?;
}
if let Some(ref x) = self.adjust_pitch {
map.serialize_entry("adjust_pitch", x)?;
}
map.end()
}
}
impl<'de> Deserialize<'de> for FloatingFruitsCatch {
fn deserialize<D: Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct FloatingFruitsCatchVisitor;
impl<'de> Visitor<'de> for FloatingFruitsCatchVisitor {
type Value = FloatingFruitsCatch;
fn expecting(&self, f: &mut Formatter<'_>) -> FmtResult {
f.write_str("FloatingFruitsCatch")
}
fn visit_map<A: MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
const FIELDS: &'static [&'static str] = &[];
while let Some(key) = map.next_key::<MaybeOwnedStr<'de>>()? {
match key.as_str() {
_ => return Err(DeError::unknown_field(key.as_str(), FIELDS)),
}
}
Ok(Self::Value {})
}
}
d.deserialize_map(FloatingFruitsCatchVisitor)
}
}
impl Serialize for FloatingFruitsCatch {
fn serialize<S: Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
let field_count = 0;
let map = s.serialize_map(Some(field_count))?;
map.end()
}
}
impl<'de> Deserialize<'de> for MutedCatch {
fn deserialize<D: Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct MutedCatchVisitor;
impl<'de> Visitor<'de> for MutedCatchVisitor {
type Value = MutedCatch;
fn expecting(&self, f: &mut Formatter<'_>) -> FmtResult {
f.write_str("MutedCatch")
}
fn visit_map<A: MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
const FIELDS: &'static [&'static str] = &[
"inverse_muting",
"enable_metronome",
"mute_combo_count",
"affects_hit_sounds",
];
let mut inverse_muting = None;
let mut enable_metronome = None;
let mut mute_combo_count = None;
let mut affects_hit_sounds = None;
while let Some(key) = map.next_key::<MaybeOwnedStr<'de>>()? {
match key.as_str() {
"inverse_muting" => inverse_muting = Some(map.next_value()?),
"enable_metronome" => enable_metronome = Some(map.next_value()?),
"mute_combo_count" => mute_combo_count = Some(map.next_value()?),
"affects_hit_sounds" => affects_hit_sounds = Some(map.next_value()?),
_ => return Err(DeError::unknown_field(key.as_str(), FIELDS)),
}
}
Ok(Self::Value {
inverse_muting: inverse_muting.unwrap_or_default(),
enable_metronome: enable_metronome.unwrap_or_default(),
mute_combo_count: mute_combo_count.unwrap_or_default(),
affects_hit_sounds: affects_hit_sounds.unwrap_or_default(),
})
}
}
d.deserialize_map(MutedCatchVisitor)
}
}
impl Serialize for MutedCatch {
fn serialize<S: Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
let field_count = self.inverse_muting.is_some() as usize
+ self.enable_metronome.is_some() as usize
+ self.mute_combo_count.is_some() as usize
+ self.affects_hit_sounds.is_some() as usize;
let mut map = s.serialize_map(Some(field_count))?;
if let Some(ref x) = self.inverse_muting {
map.serialize_entry("inverse_muting", x)?;
}
if let Some(ref x) = self.enable_metronome {
map.serialize_entry("enable_metronome", x)?;
}
if let Some(ref x) = self.mute_combo_count {
map.serialize_entry("mute_combo_count", x)?;
}
if let Some(ref x) = self.affects_hit_sounds {
map.serialize_entry("affects_hit_sounds", x)?;
}
map.end()
}
}
impl<'de> Deserialize<'de> for NoScopeCatch {
fn deserialize<D: Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct NoScopeCatchVisitor;
impl<'de> Visitor<'de> for NoScopeCatchVisitor {
type Value = NoScopeCatch;
fn expecting(&self, f: &mut Formatter<'_>) -> FmtResult {
f.write_str("NoScopeCatch")
}
fn visit_map<A: MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
const FIELDS: &'static [&'static str] = &["hidden_combo_count"];
let mut hidden_combo_count = None;
while let Some(key) = map.next_key::<MaybeOwnedStr<'de>>()? {
match key.as_str() {
"hidden_combo_count" => hidden_combo_count = Some(map.next_value()?),
_ => return Err(DeError::unknown_field(key.as_str(), FIELDS)),
}
}
Ok(Self::Value {
hidden_combo_count: hidden_combo_count.unwrap_or_default(),
})
}
}
d.deserialize_map(NoScopeCatchVisitor)
}
}
impl Serialize for NoScopeCatch {
fn serialize<S: Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
let field_count = self.hidden_combo_count.is_some() as usize;
let mut map = s.serialize_map(Some(field_count))?;
if let Some(ref x) = self.hidden_combo_count {
map.serialize_entry("hidden_combo_count", x)?;
}
map.end()
}
}
impl<'de> Deserialize<'de> for ScoreV2Catch {
fn deserialize<D: Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct ScoreV2CatchVisitor;
impl<'de> Visitor<'de> for ScoreV2CatchVisitor {
type Value = ScoreV2Catch;
fn expecting(&self, f: &mut Formatter<'_>) -> FmtResult {
f.write_str("ScoreV2Catch")
}
fn visit_map<A: MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
const FIELDS: &'static [&'static str] = &[];
while let Some(key) = map.next_key::<MaybeOwnedStr<'de>>()? {
match key.as_str() {
_ => return Err(DeError::unknown_field(key.as_str(), FIELDS)),
}
}
Ok(Self::Value {})
}
}
d.deserialize_map(ScoreV2CatchVisitor)
}
}
impl Serialize for ScoreV2Catch {
fn serialize<S: Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
let field_count = 0;
let map = s.serialize_map(Some(field_count))?;
map.end()
}
}
impl<'de> Deserialize<'de> for EasyMania {
fn deserialize<D: Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct EasyManiaVisitor;
impl<'de> Visitor<'de> for EasyManiaVisitor {
type Value = EasyMania;
fn expecting(&self, f: &mut Formatter<'_>) -> FmtResult {
f.write_str("EasyMania")
}
fn visit_map<A: MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
const FIELDS: &'static [&'static str] = &["retries"];
let mut retries = None;
while let Some(key) = map.next_key::<MaybeOwnedStr<'de>>()? {
match key.as_str() {
"retries" => retries = Some(map.next_value()?),
_ => return Err(DeError::unknown_field(key.as_str(), FIELDS)),
}
}
Ok(Self::Value {
retries: retries.unwrap_or_default(),
})
}
}
d.deserialize_map(EasyManiaVisitor)
}
}
impl Serialize for EasyMania {
fn serialize<S: Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
let field_count = self.retries.is_some() as usize;
let mut map = s.serialize_map(Some(field_count))?;
if let Some(ref x) = self.retries {
map.serialize_entry("retries", x)?;
}
map.end()
}
}
impl<'de> Deserialize<'de> for NoFailMania {
fn deserialize<D: Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct NoFailManiaVisitor;
impl<'de> Visitor<'de> for NoFailManiaVisitor {
type Value = NoFailMania;
fn expecting(&self, f: &mut Formatter<'_>) -> FmtResult {
f.write_str("NoFailMania")
}
fn visit_map<A: MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
const FIELDS: &'static [&'static str] = &[];
while let Some(key) = map.next_key::<MaybeOwnedStr<'de>>()? {
match key.as_str() {
_ => return Err(DeError::unknown_field(key.as_str(), FIELDS)),
}
}
Ok(Self::Value {})
}
}
d.deserialize_map(NoFailManiaVisitor)
}
}
impl Serialize for NoFailMania {
fn serialize<S: Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
let field_count = 0;
let map = s.serialize_map(Some(field_count))?;
map.end()
}
}
impl<'de> Deserialize<'de> for HalfTimeMania {
fn deserialize<D: Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct HalfTimeManiaVisitor;
impl<'de> Visitor<'de> for HalfTimeManiaVisitor {
type Value = HalfTimeMania;
fn expecting(&self, f: &mut Formatter<'_>) -> FmtResult {
f.write_str("HalfTimeMania")
}
fn visit_map<A: MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
const FIELDS: &'static [&'static str] = &["speed_change", "adjust_pitch"];
let mut speed_change = None;
let mut adjust_pitch = None;
while let Some(key) = map.next_key::<MaybeOwnedStr<'de>>()? {
match key.as_str() {
"speed_change" => speed_change = Some(map.next_value()?),
"adjust_pitch" => adjust_pitch = Some(map.next_value()?),
_ => return Err(DeError::unknown_field(key.as_str(), FIELDS)),
}
}
Ok(Self::Value {
speed_change: speed_change.unwrap_or_default(),
adjust_pitch: adjust_pitch.unwrap_or_default(),
})
}
}
d.deserialize_map(HalfTimeManiaVisitor)
}
}
impl Serialize for HalfTimeMania {
fn serialize<S: Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
let field_count =
self.speed_change.is_some() as usize + self.adjust_pitch.is_some() as usize;
let mut map = s.serialize_map(Some(field_count))?;
if let Some(ref x) = self.speed_change {
map.serialize_entry("speed_change", x)?;
}
if let Some(ref x) = self.adjust_pitch {
map.serialize_entry("adjust_pitch", x)?;
}
map.end()
}
}
impl<'de> Deserialize<'de> for DaycoreMania {
fn deserialize<D: Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct DaycoreManiaVisitor;
impl<'de> Visitor<'de> for DaycoreManiaVisitor {
type Value = DaycoreMania;
fn expecting(&self, f: &mut Formatter<'_>) -> FmtResult {
f.write_str("DaycoreMania")
}
fn visit_map<A: MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
const FIELDS: &'static [&'static str] = &["speed_change"];
let mut speed_change = None;
while let Some(key) = map.next_key::<MaybeOwnedStr<'de>>()? {
match key.as_str() {
"speed_change" => speed_change = Some(map.next_value()?),
_ => return Err(DeError::unknown_field(key.as_str(), FIELDS)),
}
}
Ok(Self::Value {
speed_change: speed_change.unwrap_or_default(),
})
}
}
d.deserialize_map(DaycoreManiaVisitor)
}
}
impl Serialize for DaycoreMania {
fn serialize<S: Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
let field_count = self.speed_change.is_some() as usize;
let mut map = s.serialize_map(Some(field_count))?;
if let Some(ref x) = self.speed_change {
map.serialize_entry("speed_change", x)?;
}
map.end()
}
}
impl<'de> Deserialize<'de> for NoReleaseMania {
fn deserialize<D: Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct NoReleaseManiaVisitor;
impl<'de> Visitor<'de> for NoReleaseManiaVisitor {
type Value = NoReleaseMania;
fn expecting(&self, f: &mut Formatter<'_>) -> FmtResult {
f.write_str("NoReleaseMania")
}
fn visit_map<A: MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
const FIELDS: &'static [&'static str] = &[];
while let Some(key) = map.next_key::<MaybeOwnedStr<'de>>()? {
match key.as_str() {
_ => return Err(DeError::unknown_field(key.as_str(), FIELDS)),
}
}
Ok(Self::Value {})
}
}
d.deserialize_map(NoReleaseManiaVisitor)
}
}
impl Serialize for NoReleaseMania {
fn serialize<S: Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
let field_count = 0;
let map = s.serialize_map(Some(field_count))?;
map.end()
}
}
impl<'de> Deserialize<'de> for HardRockMania {
fn deserialize<D: Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct HardRockManiaVisitor;
impl<'de> Visitor<'de> for HardRockManiaVisitor {
type Value = HardRockMania;
fn expecting(&self, f: &mut Formatter<'_>) -> FmtResult {
f.write_str("HardRockMania")
}
fn visit_map<A: MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
const FIELDS: &'static [&'static str] = &[];
while let Some(key) = map.next_key::<MaybeOwnedStr<'de>>()? {
match key.as_str() {
_ => return Err(DeError::unknown_field(key.as_str(), FIELDS)),
}
}
Ok(Self::Value {})
}
}
d.deserialize_map(HardRockManiaVisitor)
}
}
impl Serialize for HardRockMania {
fn serialize<S: Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
let field_count = 0;
let map = s.serialize_map(Some(field_count))?;
map.end()
}
}
impl<'de> Deserialize<'de> for SuddenDeathMania {
fn deserialize<D: Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct SuddenDeathManiaVisitor;
impl<'de> Visitor<'de> for SuddenDeathManiaVisitor {
type Value = SuddenDeathMania;
fn expecting(&self, f: &mut Formatter<'_>) -> FmtResult {
f.write_str("SuddenDeathMania")
}
fn visit_map<A: MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
const FIELDS: &'static [&'static str] = &["restart"];
let mut restart = None;
while let Some(key) = map.next_key::<MaybeOwnedStr<'de>>()? {
match key.as_str() {
"restart" => restart = Some(map.next_value()?),
_ => return Err(DeError::unknown_field(key.as_str(), FIELDS)),
}
}
Ok(Self::Value {
restart: restart.unwrap_or_default(),
})
}
}
d.deserialize_map(SuddenDeathManiaVisitor)
}
}
impl Serialize for SuddenDeathMania {
fn serialize<S: Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
let field_count = self.restart.is_some() as usize;
let mut map = s.serialize_map(Some(field_count))?;
if let Some(ref x) = self.restart {
map.serialize_entry("restart", x)?;
}
map.end()
}
}
impl<'de> Deserialize<'de> for PerfectMania {
fn deserialize<D: Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct PerfectManiaVisitor;
impl<'de> Visitor<'de> for PerfectManiaVisitor {
type Value = PerfectMania;
fn expecting(&self, f: &mut Formatter<'_>) -> FmtResult {
f.write_str("PerfectMania")
}
fn visit_map<A: MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
const FIELDS: &'static [&'static str] = &["restart"];
let mut restart = None;
while let Some(key) = map.next_key::<MaybeOwnedStr<'de>>()? {
match key.as_str() {
"restart" => restart = Some(map.next_value()?),
_ => return Err(DeError::unknown_field(key.as_str(), FIELDS)),
}
}
Ok(Self::Value {
restart: restart.unwrap_or_default(),
})
}
}
d.deserialize_map(PerfectManiaVisitor)
}
}
impl Serialize for PerfectMania {
fn serialize<S: Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
let field_count = self.restart.is_some() as usize;
let mut map = s.serialize_map(Some(field_count))?;
if let Some(ref x) = self.restart {
map.serialize_entry("restart", x)?;
}
map.end()
}
}
impl<'de> Deserialize<'de> for DoubleTimeMania {
fn deserialize<D: Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct DoubleTimeManiaVisitor;
impl<'de> Visitor<'de> for DoubleTimeManiaVisitor {
type Value = DoubleTimeMania;
fn expecting(&self, f: &mut Formatter<'_>) -> FmtResult {
f.write_str("DoubleTimeMania")
}
fn visit_map<A: MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
const FIELDS: &'static [&'static str] = &["speed_change", "adjust_pitch"];
let mut speed_change = None;
let mut adjust_pitch = None;
while let Some(key) = map.next_key::<MaybeOwnedStr<'de>>()? {
match key.as_str() {
"speed_change" => speed_change = Some(map.next_value()?),
"adjust_pitch" => adjust_pitch = Some(map.next_value()?),
_ => return Err(DeError::unknown_field(key.as_str(), FIELDS)),
}
}
Ok(Self::Value {
speed_change: speed_change.unwrap_or_default(),
adjust_pitch: adjust_pitch.unwrap_or_default(),
})
}
}
d.deserialize_map(DoubleTimeManiaVisitor)
}
}
impl Serialize for DoubleTimeMania {
fn serialize<S: Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
let field_count =
self.speed_change.is_some() as usize + self.adjust_pitch.is_some() as usize;
let mut map = s.serialize_map(Some(field_count))?;
if let Some(ref x) = self.speed_change {
map.serialize_entry("speed_change", x)?;
}
if let Some(ref x) = self.adjust_pitch {
map.serialize_entry("adjust_pitch", x)?;
}
map.end()
}
}
impl<'de> Deserialize<'de> for NightcoreMania {
fn deserialize<D: Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct NightcoreManiaVisitor;
impl<'de> Visitor<'de> for NightcoreManiaVisitor {
type Value = NightcoreMania;
fn expecting(&self, f: &mut Formatter<'_>) -> FmtResult {
f.write_str("NightcoreMania")
}
fn visit_map<A: MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
const FIELDS: &'static [&'static str] = &["speed_change"];
let mut speed_change = None;
while let Some(key) = map.next_key::<MaybeOwnedStr<'de>>()? {
match key.as_str() {
"speed_change" => speed_change = Some(map.next_value()?),
_ => return Err(DeError::unknown_field(key.as_str(), FIELDS)),
}
}
Ok(Self::Value {
speed_change: speed_change.unwrap_or_default(),
})
}
}
d.deserialize_map(NightcoreManiaVisitor)
}
}
impl Serialize for NightcoreMania {
fn serialize<S: Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
let field_count = self.speed_change.is_some() as usize;
let mut map = s.serialize_map(Some(field_count))?;
if let Some(ref x) = self.speed_change {
map.serialize_entry("speed_change", x)?;
}
map.end()
}
}
impl<'de> Deserialize<'de> for FadeInMania {
fn deserialize<D: Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct FadeInManiaVisitor;
impl<'de> Visitor<'de> for FadeInManiaVisitor {
type Value = FadeInMania;
fn expecting(&self, f: &mut Formatter<'_>) -> FmtResult {
f.write_str("FadeInMania")
}
fn visit_map<A: MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
const FIELDS: &'static [&'static str] = &[];
while let Some(key) = map.next_key::<MaybeOwnedStr<'de>>()? {
match key.as_str() {
_ => return Err(DeError::unknown_field(key.as_str(), FIELDS)),
}
}
Ok(Self::Value {})
}
}
d.deserialize_map(FadeInManiaVisitor)
}
}
impl Serialize for FadeInMania {
fn serialize<S: Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
let field_count = 0;
let map = s.serialize_map(Some(field_count))?;
map.end()
}
}
impl<'de> Deserialize<'de> for HiddenMania {
fn deserialize<D: Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct HiddenManiaVisitor;
impl<'de> Visitor<'de> for HiddenManiaVisitor {
type Value = HiddenMania;
fn expecting(&self, f: &mut Formatter<'_>) -> FmtResult {
f.write_str("HiddenMania")
}
fn visit_map<A: MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
const FIELDS: &'static [&'static str] = &[];
while let Some(key) = map.next_key::<MaybeOwnedStr<'de>>()? {
match key.as_str() {
_ => return Err(DeError::unknown_field(key.as_str(), FIELDS)),
}
}
Ok(Self::Value {})
}
}
d.deserialize_map(HiddenManiaVisitor)
}
}
impl Serialize for HiddenMania {
fn serialize<S: Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
let field_count = 0;
let map = s.serialize_map(Some(field_count))?;
map.end()
}
}
impl<'de> Deserialize<'de> for CoverMania {
fn deserialize<D: Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct CoverManiaVisitor;
impl<'de> Visitor<'de> for CoverManiaVisitor {
type Value = CoverMania;
fn expecting(&self, f: &mut Formatter<'_>) -> FmtResult {
f.write_str("CoverMania")
}
fn visit_map<A: MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
const FIELDS: &'static [&'static str] = &["coverage", "direction"];
let mut coverage = None;
let mut direction = None;
while let Some(key) = map.next_key::<MaybeOwnedStr<'de>>()? {
match key.as_str() {
"coverage" => coverage = Some(map.next_value()?),
"direction" => direction = Some(map.next_value()?),
_ => return Err(DeError::unknown_field(key.as_str(), FIELDS)),
}
}
Ok(Self::Value {
coverage: coverage.unwrap_or_default(),
direction: direction.unwrap_or_default(),
})
}
}
d.deserialize_map(CoverManiaVisitor)
}
}
impl Serialize for CoverMania {
fn serialize<S: Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
let field_count = self.coverage.is_some() as usize + self.direction.is_some() as usize;
let mut map = s.serialize_map(Some(field_count))?;
if let Some(ref x) = self.coverage {
map.serialize_entry("coverage", x)?;
}
if let Some(ref x) = self.direction {
map.serialize_entry("direction", x)?;
}
map.end()
}
}
impl<'de> Deserialize<'de> for FlashlightMania {
fn deserialize<D: Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct FlashlightManiaVisitor;
impl<'de> Visitor<'de> for FlashlightManiaVisitor {
type Value = FlashlightMania;
fn expecting(&self, f: &mut Formatter<'_>) -> FmtResult {
f.write_str("FlashlightMania")
}
fn visit_map<A: MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
const FIELDS: &'static [&'static str] =
&["size_multiplier", "combo_based_size"];
let mut size_multiplier = None;
let mut combo_based_size = None;
while let Some(key) = map.next_key::<MaybeOwnedStr<'de>>()? {
match key.as_str() {
"size_multiplier" => size_multiplier = Some(map.next_value()?),
"combo_based_size" => combo_based_size = Some(map.next_value()?),
_ => return Err(DeError::unknown_field(key.as_str(), FIELDS)),
}
}
Ok(Self::Value {
size_multiplier: size_multiplier.unwrap_or_default(),
combo_based_size: combo_based_size.unwrap_or_default(),
})
}
}
d.deserialize_map(FlashlightManiaVisitor)
}
}
impl Serialize for FlashlightMania {
fn serialize<S: Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
let field_count =
self.size_multiplier.is_some() as usize + self.combo_based_size.is_some() as usize;
let mut map = s.serialize_map(Some(field_count))?;
if let Some(ref x) = self.size_multiplier {
map.serialize_entry("size_multiplier", x)?;
}
if let Some(ref x) = self.combo_based_size {
map.serialize_entry("combo_based_size", x)?;
}
map.end()
}
}
impl<'de> Deserialize<'de> for AccuracyChallengeMania {
fn deserialize<D: Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct AccuracyChallengeManiaVisitor;
impl<'de> Visitor<'de> for AccuracyChallengeManiaVisitor {
type Value = AccuracyChallengeMania;
fn expecting(&self, f: &mut Formatter<'_>) -> FmtResult {
f.write_str("AccuracyChallengeMania")
}
fn visit_map<A: MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
const FIELDS: &'static [&'static str] =
&["minimum_accuracy", "accuracy_judge_mode", "restart"];
let mut minimum_accuracy = None;
let mut accuracy_judge_mode = None;
let mut restart = None;
while let Some(key) = map.next_key::<MaybeOwnedStr<'de>>()? {
match key.as_str() {
"minimum_accuracy" => minimum_accuracy = Some(map.next_value()?),
"accuracy_judge_mode" => accuracy_judge_mode = Some(map.next_value()?),
"restart" => restart = Some(map.next_value()?),
_ => return Err(DeError::unknown_field(key.as_str(), FIELDS)),
}
}
Ok(Self::Value {
minimum_accuracy: minimum_accuracy.unwrap_or_default(),
accuracy_judge_mode: accuracy_judge_mode.unwrap_or_default(),
restart: restart.unwrap_or_default(),
})
}
}
d.deserialize_map(AccuracyChallengeManiaVisitor)
}
}
impl Serialize for AccuracyChallengeMania {
fn serialize<S: Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
let field_count = self.minimum_accuracy.is_some() as usize
+ self.accuracy_judge_mode.is_some() as usize
+ self.restart.is_some() as usize;
let mut map = s.serialize_map(Some(field_count))?;
if let Some(ref x) = self.minimum_accuracy {
map.serialize_entry("minimum_accuracy", x)?;
}
if let Some(ref x) = self.accuracy_judge_mode {
map.serialize_entry("accuracy_judge_mode", x)?;
}
if let Some(ref x) = self.restart {
map.serialize_entry("restart", x)?;
}
map.end()
}
}
impl<'de> Deserialize<'de> for RandomMania {
fn deserialize<D: Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct RandomManiaVisitor;
impl<'de> Visitor<'de> for RandomManiaVisitor {
type Value = RandomMania;
fn expecting(&self, f: &mut Formatter<'_>) -> FmtResult {
f.write_str("RandomMania")
}
fn visit_map<A: MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
const FIELDS: &'static [&'static str] = &["seed"];
let mut seed = None;
while let Some(key) = map.next_key::<MaybeOwnedStr<'de>>()? {
match key.as_str() {
"seed" => seed = Some(map.next_value()?),
_ => return Err(DeError::unknown_field(key.as_str(), FIELDS)),
}
}
Ok(Self::Value {
seed: seed.unwrap_or_default(),
})
}
}
d.deserialize_map(RandomManiaVisitor)
}
}
impl Serialize for RandomMania {
fn serialize<S: Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
let field_count = self.seed.is_some() as usize;
let mut map = s.serialize_map(Some(field_count))?;
if let Some(ref x) = self.seed {
map.serialize_entry("seed", x)?;
}
map.end()
}
}
impl<'de> Deserialize<'de> for DualStagesMania {
fn deserialize<D: Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct DualStagesManiaVisitor;
impl<'de> Visitor<'de> for DualStagesManiaVisitor {
type Value = DualStagesMania;
fn expecting(&self, f: &mut Formatter<'_>) -> FmtResult {
f.write_str("DualStagesMania")
}
fn visit_map<A: MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
const FIELDS: &'static [&'static str] = &[];
while let Some(key) = map.next_key::<MaybeOwnedStr<'de>>()? {
match key.as_str() {
_ => return Err(DeError::unknown_field(key.as_str(), FIELDS)),
}
}
Ok(Self::Value {})
}
}
d.deserialize_map(DualStagesManiaVisitor)
}
}
impl Serialize for DualStagesMania {
fn serialize<S: Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
let field_count = 0;
let map = s.serialize_map(Some(field_count))?;
map.end()
}
}
impl<'de> Deserialize<'de> for MirrorMania {
fn deserialize<D: Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct MirrorManiaVisitor;
impl<'de> Visitor<'de> for MirrorManiaVisitor {
type Value = MirrorMania;
fn expecting(&self, f: &mut Formatter<'_>) -> FmtResult {
f.write_str("MirrorMania")
}
fn visit_map<A: MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
const FIELDS: &'static [&'static str] = &[];
while let Some(key) = map.next_key::<MaybeOwnedStr<'de>>()? {
match key.as_str() {
_ => return Err(DeError::unknown_field(key.as_str(), FIELDS)),
}
}
Ok(Self::Value {})
}
}
d.deserialize_map(MirrorManiaVisitor)
}
}
impl Serialize for MirrorMania {
fn serialize<S: Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
let field_count = 0;
let map = s.serialize_map(Some(field_count))?;
map.end()
}
}
impl<'de> Deserialize<'de> for DifficultyAdjustMania {
fn deserialize<D: Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct DifficultyAdjustManiaVisitor;
impl<'de> Visitor<'de> for DifficultyAdjustManiaVisitor {
type Value = DifficultyAdjustMania;
fn expecting(&self, f: &mut Formatter<'_>) -> FmtResult {
f.write_str("DifficultyAdjustMania")
}
fn visit_map<A: MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
const FIELDS: &'static [&'static str] =
&["drain_rate", "overall_difficulty", "extended_limits"];
let mut drain_rate = None;
let mut overall_difficulty = None;
let mut extended_limits = None;
while let Some(key) = map.next_key::<MaybeOwnedStr<'de>>()? {
match key.as_str() {
"drain_rate" => drain_rate = Some(map.next_value()?),
"overall_difficulty" => overall_difficulty = Some(map.next_value()?),
"extended_limits" => extended_limits = Some(map.next_value()?),
_ => return Err(DeError::unknown_field(key.as_str(), FIELDS)),
}
}
Ok(Self::Value {
drain_rate: drain_rate.unwrap_or_default(),
overall_difficulty: overall_difficulty.unwrap_or_default(),
extended_limits: extended_limits.unwrap_or_default(),
})
}
}
d.deserialize_map(DifficultyAdjustManiaVisitor)
}
}
impl Serialize for DifficultyAdjustMania {
fn serialize<S: Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
let field_count = self.drain_rate.is_some() as usize
+ self.overall_difficulty.is_some() as usize
+ self.extended_limits.is_some() as usize;
let mut map = s.serialize_map(Some(field_count))?;
if let Some(ref x) = self.drain_rate {
map.serialize_entry("drain_rate", x)?;
}
if let Some(ref x) = self.overall_difficulty {
map.serialize_entry("overall_difficulty", x)?;
}
if let Some(ref x) = self.extended_limits {
map.serialize_entry("extended_limits", x)?;
}
map.end()
}
}
impl<'de> Deserialize<'de> for ClassicMania {
fn deserialize<D: Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct ClassicManiaVisitor;
impl<'de> Visitor<'de> for ClassicManiaVisitor {
type Value = ClassicMania;
fn expecting(&self, f: &mut Formatter<'_>) -> FmtResult {
f.write_str("ClassicMania")
}
fn visit_map<A: MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
const FIELDS: &'static [&'static str] = &[];
while let Some(key) = map.next_key::<MaybeOwnedStr<'de>>()? {
match key.as_str() {
_ => return Err(DeError::unknown_field(key.as_str(), FIELDS)),
}
}
Ok(Self::Value {})
}
}
d.deserialize_map(ClassicManiaVisitor)
}
}
impl Serialize for ClassicMania {
fn serialize<S: Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
let field_count = 0;
let map = s.serialize_map(Some(field_count))?;
map.end()
}
}
impl<'de> Deserialize<'de> for InvertMania {
fn deserialize<D: Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct InvertManiaVisitor;
impl<'de> Visitor<'de> for InvertManiaVisitor {
type Value = InvertMania;
fn expecting(&self, f: &mut Formatter<'_>) -> FmtResult {
f.write_str("InvertMania")
}
fn visit_map<A: MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
const FIELDS: &'static [&'static str] = &[];
while let Some(key) = map.next_key::<MaybeOwnedStr<'de>>()? {
match key.as_str() {
_ => return Err(DeError::unknown_field(key.as_str(), FIELDS)),
}
}
Ok(Self::Value {})
}
}
d.deserialize_map(InvertManiaVisitor)
}
}
impl Serialize for InvertMania {
fn serialize<S: Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
let field_count = 0;
let map = s.serialize_map(Some(field_count))?;
map.end()
}
}
impl<'de> Deserialize<'de> for ConstantSpeedMania {
fn deserialize<D: Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct ConstantSpeedManiaVisitor;
impl<'de> Visitor<'de> for ConstantSpeedManiaVisitor {
type Value = ConstantSpeedMania;
fn expecting(&self, f: &mut Formatter<'_>) -> FmtResult {
f.write_str("ConstantSpeedMania")
}
fn visit_map<A: MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
const FIELDS: &'static [&'static str] = &[];
while let Some(key) = map.next_key::<MaybeOwnedStr<'de>>()? {
match key.as_str() {
_ => return Err(DeError::unknown_field(key.as_str(), FIELDS)),
}
}
Ok(Self::Value {})
}
}
d.deserialize_map(ConstantSpeedManiaVisitor)
}
}
impl Serialize for ConstantSpeedMania {
fn serialize<S: Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
let field_count = 0;
let map = s.serialize_map(Some(field_count))?;
map.end()
}
}
impl<'de> Deserialize<'de> for HoldOffMania {
fn deserialize<D: Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct HoldOffManiaVisitor;
impl<'de> Visitor<'de> for HoldOffManiaVisitor {
type Value = HoldOffMania;
fn expecting(&self, f: &mut Formatter<'_>) -> FmtResult {
f.write_str("HoldOffMania")
}
fn visit_map<A: MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
const FIELDS: &'static [&'static str] = &[];
while let Some(key) = map.next_key::<MaybeOwnedStr<'de>>()? {
match key.as_str() {
_ => return Err(DeError::unknown_field(key.as_str(), FIELDS)),
}
}
Ok(Self::Value {})
}
}
d.deserialize_map(HoldOffManiaVisitor)
}
}
impl Serialize for HoldOffMania {
fn serialize<S: Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
let field_count = 0;
let map = s.serialize_map(Some(field_count))?;
map.end()
}
}
impl<'de> Deserialize<'de> for OneKeyMania {
fn deserialize<D: Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct OneKeyManiaVisitor;
impl<'de> Visitor<'de> for OneKeyManiaVisitor {
type Value = OneKeyMania;
fn expecting(&self, f: &mut Formatter<'_>) -> FmtResult {
f.write_str("OneKeyMania")
}
fn visit_map<A: MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
const FIELDS: &'static [&'static str] = &[];
while let Some(key) = map.next_key::<MaybeOwnedStr<'de>>()? {
match key.as_str() {
_ => return Err(DeError::unknown_field(key.as_str(), FIELDS)),
}
}
Ok(Self::Value {})
}
}
d.deserialize_map(OneKeyManiaVisitor)
}
}
impl Serialize for OneKeyMania {
fn serialize<S: Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
let field_count = 0;
let map = s.serialize_map(Some(field_count))?;
map.end()
}
}
impl<'de> Deserialize<'de> for TwoKeysMania {
fn deserialize<D: Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct TwoKeysManiaVisitor;
impl<'de> Visitor<'de> for TwoKeysManiaVisitor {
type Value = TwoKeysMania;
fn expecting(&self, f: &mut Formatter<'_>) -> FmtResult {
f.write_str("TwoKeysMania")
}
fn visit_map<A: MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
const FIELDS: &'static [&'static str] = &[];
while let Some(key) = map.next_key::<MaybeOwnedStr<'de>>()? {
match key.as_str() {
_ => return Err(DeError::unknown_field(key.as_str(), FIELDS)),
}
}
Ok(Self::Value {})
}
}
d.deserialize_map(TwoKeysManiaVisitor)
}
}
impl Serialize for TwoKeysMania {
fn serialize<S: Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
let field_count = 0;
let map = s.serialize_map(Some(field_count))?;
map.end()
}
}
impl<'de> Deserialize<'de> for ThreeKeysMania {
fn deserialize<D: Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct ThreeKeysManiaVisitor;
impl<'de> Visitor<'de> for ThreeKeysManiaVisitor {
type Value = ThreeKeysMania;
fn expecting(&self, f: &mut Formatter<'_>) -> FmtResult {
f.write_str("ThreeKeysMania")
}
fn visit_map<A: MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
const FIELDS: &'static [&'static str] = &[];
while let Some(key) = map.next_key::<MaybeOwnedStr<'de>>()? {
match key.as_str() {
_ => return Err(DeError::unknown_field(key.as_str(), FIELDS)),
}
}
Ok(Self::Value {})
}
}
d.deserialize_map(ThreeKeysManiaVisitor)
}
}
impl Serialize for ThreeKeysMania {
fn serialize<S: Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
let field_count = 0;
let map = s.serialize_map(Some(field_count))?;
map.end()
}
}
impl<'de> Deserialize<'de> for FourKeysMania {
fn deserialize<D: Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct FourKeysManiaVisitor;
impl<'de> Visitor<'de> for FourKeysManiaVisitor {
type Value = FourKeysMania;
fn expecting(&self, f: &mut Formatter<'_>) -> FmtResult {
f.write_str("FourKeysMania")
}
fn visit_map<A: MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
const FIELDS: &'static [&'static str] = &[];
while let Some(key) = map.next_key::<MaybeOwnedStr<'de>>()? {
match key.as_str() {
_ => return Err(DeError::unknown_field(key.as_str(), FIELDS)),
}
}
Ok(Self::Value {})
}
}
d.deserialize_map(FourKeysManiaVisitor)
}
}
impl Serialize for FourKeysMania {
fn serialize<S: Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
let field_count = 0;
let map = s.serialize_map(Some(field_count))?;
map.end()
}
}
impl<'de> Deserialize<'de> for FiveKeysMania {
fn deserialize<D: Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct FiveKeysManiaVisitor;
impl<'de> Visitor<'de> for FiveKeysManiaVisitor {
type Value = FiveKeysMania;
fn expecting(&self, f: &mut Formatter<'_>) -> FmtResult {
f.write_str("FiveKeysMania")
}
fn visit_map<A: MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
const FIELDS: &'static [&'static str] = &[];
while let Some(key) = map.next_key::<MaybeOwnedStr<'de>>()? {
match key.as_str() {
_ => return Err(DeError::unknown_field(key.as_str(), FIELDS)),
}
}
Ok(Self::Value {})
}
}
d.deserialize_map(FiveKeysManiaVisitor)
}
}
impl Serialize for FiveKeysMania {
fn serialize<S: Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
let field_count = 0;
let map = s.serialize_map(Some(field_count))?;
map.end()
}
}
impl<'de> Deserialize<'de> for SixKeysMania {
fn deserialize<D: Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct SixKeysManiaVisitor;
impl<'de> Visitor<'de> for SixKeysManiaVisitor {
type Value = SixKeysMania;
fn expecting(&self, f: &mut Formatter<'_>) -> FmtResult {
f.write_str("SixKeysMania")
}
fn visit_map<A: MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
const FIELDS: &'static [&'static str] = &[];
while let Some(key) = map.next_key::<MaybeOwnedStr<'de>>()? {
match key.as_str() {
_ => return Err(DeError::unknown_field(key.as_str(), FIELDS)),
}
}
Ok(Self::Value {})
}
}
d.deserialize_map(SixKeysManiaVisitor)
}
}
impl Serialize for SixKeysMania {
fn serialize<S: Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
let field_count = 0;
let map = s.serialize_map(Some(field_count))?;
map.end()
}
}
impl<'de> Deserialize<'de> for SevenKeysMania {
fn deserialize<D: Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct SevenKeysManiaVisitor;
impl<'de> Visitor<'de> for SevenKeysManiaVisitor {
type Value = SevenKeysMania;
fn expecting(&self, f: &mut Formatter<'_>) -> FmtResult {
f.write_str("SevenKeysMania")
}
fn visit_map<A: MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
const FIELDS: &'static [&'static str] = &[];
while let Some(key) = map.next_key::<MaybeOwnedStr<'de>>()? {
match key.as_str() {
_ => return Err(DeError::unknown_field(key.as_str(), FIELDS)),
}
}
Ok(Self::Value {})
}
}
d.deserialize_map(SevenKeysManiaVisitor)
}
}
impl Serialize for SevenKeysMania {
fn serialize<S: Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
let field_count = 0;
let map = s.serialize_map(Some(field_count))?;
map.end()
}
}
impl<'de> Deserialize<'de> for EightKeysMania {
fn deserialize<D: Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct EightKeysManiaVisitor;
impl<'de> Visitor<'de> for EightKeysManiaVisitor {
type Value = EightKeysMania;
fn expecting(&self, f: &mut Formatter<'_>) -> FmtResult {
f.write_str("EightKeysMania")
}
fn visit_map<A: MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
const FIELDS: &'static [&'static str] = &[];
while let Some(key) = map.next_key::<MaybeOwnedStr<'de>>()? {
match key.as_str() {
_ => return Err(DeError::unknown_field(key.as_str(), FIELDS)),
}
}
Ok(Self::Value {})
}
}
d.deserialize_map(EightKeysManiaVisitor)
}
}
impl Serialize for EightKeysMania {
fn serialize<S: Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
let field_count = 0;
let map = s.serialize_map(Some(field_count))?;
map.end()
}
}
impl<'de> Deserialize<'de> for NineKeysMania {
fn deserialize<D: Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct NineKeysManiaVisitor;
impl<'de> Visitor<'de> for NineKeysManiaVisitor {
type Value = NineKeysMania;
fn expecting(&self, f: &mut Formatter<'_>) -> FmtResult {
f.write_str("NineKeysMania")
}
fn visit_map<A: MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
const FIELDS: &'static [&'static str] = &[];
while let Some(key) = map.next_key::<MaybeOwnedStr<'de>>()? {
match key.as_str() {
_ => return Err(DeError::unknown_field(key.as_str(), FIELDS)),
}
}
Ok(Self::Value {})
}
}
d.deserialize_map(NineKeysManiaVisitor)
}
}
impl Serialize for NineKeysMania {
fn serialize<S: Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
let field_count = 0;
let map = s.serialize_map(Some(field_count))?;
map.end()
}
}
impl<'de> Deserialize<'de> for TenKeysMania {
fn deserialize<D: Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct TenKeysManiaVisitor;
impl<'de> Visitor<'de> for TenKeysManiaVisitor {
type Value = TenKeysMania;
fn expecting(&self, f: &mut Formatter<'_>) -> FmtResult {
f.write_str("TenKeysMania")
}
fn visit_map<A: MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
const FIELDS: &'static [&'static str] = &[];
while let Some(key) = map.next_key::<MaybeOwnedStr<'de>>()? {
match key.as_str() {
_ => return Err(DeError::unknown_field(key.as_str(), FIELDS)),
}
}
Ok(Self::Value {})
}
}
d.deserialize_map(TenKeysManiaVisitor)
}
}
impl Serialize for TenKeysMania {
fn serialize<S: Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
let field_count = 0;
let map = s.serialize_map(Some(field_count))?;
map.end()
}
}
impl<'de> Deserialize<'de> for AutoplayMania {
fn deserialize<D: Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct AutoplayManiaVisitor;
impl<'de> Visitor<'de> for AutoplayManiaVisitor {
type Value = AutoplayMania;
fn expecting(&self, f: &mut Formatter<'_>) -> FmtResult {
f.write_str("AutoplayMania")
}
fn visit_map<A: MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
const FIELDS: &'static [&'static str] = &[];
while let Some(key) = map.next_key::<MaybeOwnedStr<'de>>()? {
match key.as_str() {
_ => return Err(DeError::unknown_field(key.as_str(), FIELDS)),
}
}
Ok(Self::Value {})
}
}
d.deserialize_map(AutoplayManiaVisitor)
}
}
impl Serialize for AutoplayMania {
fn serialize<S: Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
let field_count = 0;
let map = s.serialize_map(Some(field_count))?;
map.end()
}
}
impl<'de> Deserialize<'de> for CinemaMania {
fn deserialize<D: Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct CinemaManiaVisitor;
impl<'de> Visitor<'de> for CinemaManiaVisitor {
type Value = CinemaMania;
fn expecting(&self, f: &mut Formatter<'_>) -> FmtResult {
f.write_str("CinemaMania")
}
fn visit_map<A: MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
const FIELDS: &'static [&'static str] = &[];
while let Some(key) = map.next_key::<MaybeOwnedStr<'de>>()? {
match key.as_str() {
_ => return Err(DeError::unknown_field(key.as_str(), FIELDS)),
}
}
Ok(Self::Value {})
}
}
d.deserialize_map(CinemaManiaVisitor)
}
}
impl Serialize for CinemaMania {
fn serialize<S: Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
let field_count = 0;
let map = s.serialize_map(Some(field_count))?;
map.end()
}
}
impl<'de> Deserialize<'de> for WindUpMania {
fn deserialize<D: Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct WindUpManiaVisitor;
impl<'de> Visitor<'de> for WindUpManiaVisitor {
type Value = WindUpMania;
fn expecting(&self, f: &mut Formatter<'_>) -> FmtResult {
f.write_str("WindUpMania")
}
fn visit_map<A: MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
const FIELDS: &'static [&'static str] =
&["initial_rate", "final_rate", "adjust_pitch"];
let mut initial_rate = None;
let mut final_rate = None;
let mut adjust_pitch = None;
while let Some(key) = map.next_key::<MaybeOwnedStr<'de>>()? {
match key.as_str() {
"initial_rate" => initial_rate = Some(map.next_value()?),
"final_rate" => final_rate = Some(map.next_value()?),
"adjust_pitch" => adjust_pitch = Some(map.next_value()?),
_ => return Err(DeError::unknown_field(key.as_str(), FIELDS)),
}
}
Ok(Self::Value {
initial_rate: initial_rate.unwrap_or_default(),
final_rate: final_rate.unwrap_or_default(),
adjust_pitch: adjust_pitch.unwrap_or_default(),
})
}
}
d.deserialize_map(WindUpManiaVisitor)
}
}
impl Serialize for WindUpMania {
fn serialize<S: Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
let field_count = self.initial_rate.is_some() as usize
+ self.final_rate.is_some() as usize
+ self.adjust_pitch.is_some() as usize;
let mut map = s.serialize_map(Some(field_count))?;
if let Some(ref x) = self.initial_rate {
map.serialize_entry("initial_rate", x)?;
}
if let Some(ref x) = self.final_rate {
map.serialize_entry("final_rate", x)?;
}
if let Some(ref x) = self.adjust_pitch {
map.serialize_entry("adjust_pitch", x)?;
}
map.end()
}
}
impl<'de> Deserialize<'de> for WindDownMania {
fn deserialize<D: Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct WindDownManiaVisitor;
impl<'de> Visitor<'de> for WindDownManiaVisitor {
type Value = WindDownMania;
fn expecting(&self, f: &mut Formatter<'_>) -> FmtResult {
f.write_str("WindDownMania")
}
fn visit_map<A: MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
const FIELDS: &'static [&'static str] =
&["initial_rate", "final_rate", "adjust_pitch"];
let mut initial_rate = None;
let mut final_rate = None;
let mut adjust_pitch = None;
while let Some(key) = map.next_key::<MaybeOwnedStr<'de>>()? {
match key.as_str() {
"initial_rate" => initial_rate = Some(map.next_value()?),
"final_rate" => final_rate = Some(map.next_value()?),
"adjust_pitch" => adjust_pitch = Some(map.next_value()?),
_ => return Err(DeError::unknown_field(key.as_str(), FIELDS)),
}
}
Ok(Self::Value {
initial_rate: initial_rate.unwrap_or_default(),
final_rate: final_rate.unwrap_or_default(),
adjust_pitch: adjust_pitch.unwrap_or_default(),
})
}
}
d.deserialize_map(WindDownManiaVisitor)
}
}
impl Serialize for WindDownMania {
fn serialize<S: Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
let field_count = self.initial_rate.is_some() as usize
+ self.final_rate.is_some() as usize
+ self.adjust_pitch.is_some() as usize;
let mut map = s.serialize_map(Some(field_count))?;
if let Some(ref x) = self.initial_rate {
map.serialize_entry("initial_rate", x)?;
}
if let Some(ref x) = self.final_rate {
map.serialize_entry("final_rate", x)?;
}
if let Some(ref x) = self.adjust_pitch {
map.serialize_entry("adjust_pitch", x)?;
}
map.end()
}
}
impl<'de> Deserialize<'de> for MutedMania {
fn deserialize<D: Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct MutedManiaVisitor;
impl<'de> Visitor<'de> for MutedManiaVisitor {
type Value = MutedMania;
fn expecting(&self, f: &mut Formatter<'_>) -> FmtResult {
f.write_str("MutedMania")
}
fn visit_map<A: MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
const FIELDS: &'static [&'static str] = &[
"inverse_muting",
"enable_metronome",
"mute_combo_count",
"affects_hit_sounds",
];
let mut inverse_muting = None;
let mut enable_metronome = None;
let mut mute_combo_count = None;
let mut affects_hit_sounds = None;
while let Some(key) = map.next_key::<MaybeOwnedStr<'de>>()? {
match key.as_str() {
"inverse_muting" => inverse_muting = Some(map.next_value()?),
"enable_metronome" => enable_metronome = Some(map.next_value()?),
"mute_combo_count" => mute_combo_count = Some(map.next_value()?),
"affects_hit_sounds" => affects_hit_sounds = Some(map.next_value()?),
_ => return Err(DeError::unknown_field(key.as_str(), FIELDS)),
}
}
Ok(Self::Value {
inverse_muting: inverse_muting.unwrap_or_default(),
enable_metronome: enable_metronome.unwrap_or_default(),
mute_combo_count: mute_combo_count.unwrap_or_default(),
affects_hit_sounds: affects_hit_sounds.unwrap_or_default(),
})
}
}
d.deserialize_map(MutedManiaVisitor)
}
}
impl Serialize for MutedMania {
fn serialize<S: Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
let field_count = self.inverse_muting.is_some() as usize
+ self.enable_metronome.is_some() as usize
+ self.mute_combo_count.is_some() as usize
+ self.affects_hit_sounds.is_some() as usize;
let mut map = s.serialize_map(Some(field_count))?;
if let Some(ref x) = self.inverse_muting {
map.serialize_entry("inverse_muting", x)?;
}
if let Some(ref x) = self.enable_metronome {
map.serialize_entry("enable_metronome", x)?;
}
if let Some(ref x) = self.mute_combo_count {
map.serialize_entry("mute_combo_count", x)?;
}
if let Some(ref x) = self.affects_hit_sounds {
map.serialize_entry("affects_hit_sounds", x)?;
}
map.end()
}
}
impl<'de> Deserialize<'de> for AdaptiveSpeedMania {
fn deserialize<D: Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct AdaptiveSpeedManiaVisitor;
impl<'de> Visitor<'de> for AdaptiveSpeedManiaVisitor {
type Value = AdaptiveSpeedMania;
fn expecting(&self, f: &mut Formatter<'_>) -> FmtResult {
f.write_str("AdaptiveSpeedMania")
}
fn visit_map<A: MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
const FIELDS: &'static [&'static str] = &["initial_rate", "adjust_pitch"];
let mut initial_rate = None;
let mut adjust_pitch = None;
while let Some(key) = map.next_key::<MaybeOwnedStr<'de>>()? {
match key.as_str() {
"initial_rate" => initial_rate = Some(map.next_value()?),
"adjust_pitch" => adjust_pitch = Some(map.next_value()?),
_ => return Err(DeError::unknown_field(key.as_str(), FIELDS)),
}
}
Ok(Self::Value {
initial_rate: initial_rate.unwrap_or_default(),
adjust_pitch: adjust_pitch.unwrap_or_default(),
})
}
}
d.deserialize_map(AdaptiveSpeedManiaVisitor)
}
}
impl Serialize for AdaptiveSpeedMania {
fn serialize<S: Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
let field_count =
self.initial_rate.is_some() as usize + self.adjust_pitch.is_some() as usize;
let mut map = s.serialize_map(Some(field_count))?;
if let Some(ref x) = self.initial_rate {
map.serialize_entry("initial_rate", x)?;
}
if let Some(ref x) = self.adjust_pitch {
map.serialize_entry("adjust_pitch", x)?;
}
map.end()
}
}
impl<'de> Deserialize<'de> for ScoreV2Mania {
fn deserialize<D: Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct ScoreV2ManiaVisitor;
impl<'de> Visitor<'de> for ScoreV2ManiaVisitor {
type Value = ScoreV2Mania;
fn expecting(&self, f: &mut Formatter<'_>) -> FmtResult {
f.write_str("ScoreV2Mania")
}
fn visit_map<A: MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
const FIELDS: &'static [&'static str] = &[];
while let Some(key) = map.next_key::<MaybeOwnedStr<'de>>()? {
match key.as_str() {
_ => return Err(DeError::unknown_field(key.as_str(), FIELDS)),
}
}
Ok(Self::Value {})
}
}
d.deserialize_map(ScoreV2ManiaVisitor)
}
}
impl Serialize for ScoreV2Mania {
fn serialize<S: Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
let field_count = 0;
let map = s.serialize_map(Some(field_count))?;
map.end()
}
}
impl<'de> Deserialize<'de> for UnknownMod {
fn deserialize<D: Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct UnknownModVisitor;
impl<'de> Visitor<'de> for UnknownModVisitor {
type Value = UnknownMod;
fn expecting(&self, f: &mut Formatter<'_>) -> FmtResult {
f.write_str("any unknown mod")
}
fn visit_map<A: MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
while map.next_entry::<IgnoredAny, IgnoredAny>()?.is_some() {}
Ok(UnknownMod {
acronym: UnknownMod::UNKNOWN_ACRONYM,
})
}
}
d.deserialize_map(UnknownModVisitor)
}
}
impl Serialize for UnknownMod {
fn serialize<S: Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
s.serialize_map(Some(0)).and_then(SerializeMap::end)
}
}
impl<'a, 'de> Visitor<'de> for GameModSettingsSeed<'a> {
type Value = GameMod;
fn expecting(&self, f: &mut Formatter<'_>) -> FmtResult {
f.write_str("GameMod settings")
}
fn visit_map<A: MapAccess<'de>>(self, map: A) -> Result<Self::Value, A::Error> {
let d = MapAccessDeserializer::new(map);
let res = match (self.acronym, self.mode) {
("EZ", GameMode::Osu) => GameMod::EasyOsu(Deserialize::deserialize(d)?),
("NF", GameMode::Osu) => GameMod::NoFailOsu(Deserialize::deserialize(d)?),
("HT", GameMode::Osu) => GameMod::HalfTimeOsu(Deserialize::deserialize(d)?),
("DC", GameMode::Osu) => GameMod::DaycoreOsu(Deserialize::deserialize(d)?),
("HR", GameMode::Osu) => GameMod::HardRockOsu(Deserialize::deserialize(d)?),
("SD", GameMode::Osu) => GameMod::SuddenDeathOsu(Deserialize::deserialize(d)?),
("PF", GameMode::Osu) => GameMod::PerfectOsu(Deserialize::deserialize(d)?),
("DT", GameMode::Osu) => GameMod::DoubleTimeOsu(Deserialize::deserialize(d)?),
("NC", GameMode::Osu) => GameMod::NightcoreOsu(Deserialize::deserialize(d)?),
("HD", GameMode::Osu) => GameMod::HiddenOsu(Deserialize::deserialize(d)?),
("FL", GameMode::Osu) => GameMod::FlashlightOsu(Deserialize::deserialize(d)?),
("BL", GameMode::Osu) => GameMod::BlindsOsu(Deserialize::deserialize(d)?),
("ST", GameMode::Osu) => GameMod::StrictTrackingOsu(Deserialize::deserialize(d)?),
("AC", GameMode::Osu) => {
GameMod::AccuracyChallengeOsu(Deserialize::deserialize(d)?)
}
("TP", GameMode::Osu) => GameMod::TargetPracticeOsu(Deserialize::deserialize(d)?),
("DA", GameMode::Osu) => GameMod::DifficultyAdjustOsu(Deserialize::deserialize(d)?),
("CL", GameMode::Osu) => GameMod::ClassicOsu(Deserialize::deserialize(d)?),
("RD", GameMode::Osu) => GameMod::RandomOsu(Deserialize::deserialize(d)?),
("MR", GameMode::Osu) => GameMod::MirrorOsu(Deserialize::deserialize(d)?),
("AL", GameMode::Osu) => GameMod::AlternateOsu(Deserialize::deserialize(d)?),
("SG", GameMode::Osu) => GameMod::SingleTapOsu(Deserialize::deserialize(d)?),
("AT", GameMode::Osu) => GameMod::AutoplayOsu(Deserialize::deserialize(d)?),
("CN", GameMode::Osu) => GameMod::CinemaOsu(Deserialize::deserialize(d)?),
("RX", GameMode::Osu) => GameMod::RelaxOsu(Deserialize::deserialize(d)?),
("AP", GameMode::Osu) => GameMod::AutopilotOsu(Deserialize::deserialize(d)?),
("SO", GameMode::Osu) => GameMod::SpunOutOsu(Deserialize::deserialize(d)?),
("TR", GameMode::Osu) => GameMod::TransformOsu(Deserialize::deserialize(d)?),
("WG", GameMode::Osu) => GameMod::WiggleOsu(Deserialize::deserialize(d)?),
("SI", GameMode::Osu) => GameMod::SpinInOsu(Deserialize::deserialize(d)?),
("GR", GameMode::Osu) => GameMod::GrowOsu(Deserialize::deserialize(d)?),
("DF", GameMode::Osu) => GameMod::DeflateOsu(Deserialize::deserialize(d)?),
("WU", GameMode::Osu) => GameMod::WindUpOsu(Deserialize::deserialize(d)?),
("WD", GameMode::Osu) => GameMod::WindDownOsu(Deserialize::deserialize(d)?),
("TC", GameMode::Osu) => GameMod::TraceableOsu(Deserialize::deserialize(d)?),
("BR", GameMode::Osu) => GameMod::BarrelRollOsu(Deserialize::deserialize(d)?),
("AD", GameMode::Osu) => {
GameMod::ApproachDifferentOsu(Deserialize::deserialize(d)?)
}
("MU", GameMode::Osu) => GameMod::MutedOsu(Deserialize::deserialize(d)?),
("NS", GameMode::Osu) => GameMod::NoScopeOsu(Deserialize::deserialize(d)?),
("MG", GameMode::Osu) => GameMod::MagnetisedOsu(Deserialize::deserialize(d)?),
("RP", GameMode::Osu) => GameMod::RepelOsu(Deserialize::deserialize(d)?),
("AS", GameMode::Osu) => GameMod::AdaptiveSpeedOsu(Deserialize::deserialize(d)?),
("FR", GameMode::Osu) => GameMod::FreezeFrameOsu(Deserialize::deserialize(d)?),
("BU", GameMode::Osu) => GameMod::BubblesOsu(Deserialize::deserialize(d)?),
("SY", GameMode::Osu) => GameMod::SynesthesiaOsu(Deserialize::deserialize(d)?),
("DP", GameMode::Osu) => GameMod::DepthOsu(Deserialize::deserialize(d)?),
("TD", GameMode::Osu) => GameMod::TouchDeviceOsu(Deserialize::deserialize(d)?),
("SV2", GameMode::Osu) => GameMod::ScoreV2Osu(Deserialize::deserialize(d)?),
("EZ", GameMode::Taiko) => GameMod::EasyTaiko(Deserialize::deserialize(d)?),
("NF", GameMode::Taiko) => GameMod::NoFailTaiko(Deserialize::deserialize(d)?),
("HT", GameMode::Taiko) => GameMod::HalfTimeTaiko(Deserialize::deserialize(d)?),
("DC", GameMode::Taiko) => GameMod::DaycoreTaiko(Deserialize::deserialize(d)?),
("HR", GameMode::Taiko) => GameMod::HardRockTaiko(Deserialize::deserialize(d)?),
("SD", GameMode::Taiko) => GameMod::SuddenDeathTaiko(Deserialize::deserialize(d)?),
("PF", GameMode::Taiko) => GameMod::PerfectTaiko(Deserialize::deserialize(d)?),
("DT", GameMode::Taiko) => GameMod::DoubleTimeTaiko(Deserialize::deserialize(d)?),
("NC", GameMode::Taiko) => GameMod::NightcoreTaiko(Deserialize::deserialize(d)?),
("HD", GameMode::Taiko) => GameMod::HiddenTaiko(Deserialize::deserialize(d)?),
("FL", GameMode::Taiko) => GameMod::FlashlightTaiko(Deserialize::deserialize(d)?),
("AC", GameMode::Taiko) => {
GameMod::AccuracyChallengeTaiko(Deserialize::deserialize(d)?)
}
("RD", GameMode::Taiko) => GameMod::RandomTaiko(Deserialize::deserialize(d)?),
("DA", GameMode::Taiko) => {
GameMod::DifficultyAdjustTaiko(Deserialize::deserialize(d)?)
}
("CL", GameMode::Taiko) => GameMod::ClassicTaiko(Deserialize::deserialize(d)?),
("SW", GameMode::Taiko) => GameMod::SwapTaiko(Deserialize::deserialize(d)?),
("SG", GameMode::Taiko) => GameMod::SingleTapTaiko(Deserialize::deserialize(d)?),
("CS", GameMode::Taiko) => {
GameMod::ConstantSpeedTaiko(Deserialize::deserialize(d)?)
}
("AT", GameMode::Taiko) => GameMod::AutoplayTaiko(Deserialize::deserialize(d)?),
("CN", GameMode::Taiko) => GameMod::CinemaTaiko(Deserialize::deserialize(d)?),
("RX", GameMode::Taiko) => GameMod::RelaxTaiko(Deserialize::deserialize(d)?),
("WU", GameMode::Taiko) => GameMod::WindUpTaiko(Deserialize::deserialize(d)?),
("WD", GameMode::Taiko) => GameMod::WindDownTaiko(Deserialize::deserialize(d)?),
("MU", GameMode::Taiko) => GameMod::MutedTaiko(Deserialize::deserialize(d)?),
("AS", GameMode::Taiko) => {
GameMod::AdaptiveSpeedTaiko(Deserialize::deserialize(d)?)
}
("SV2", GameMode::Taiko) => GameMod::ScoreV2Taiko(Deserialize::deserialize(d)?),
("EZ", GameMode::Catch) => GameMod::EasyCatch(Deserialize::deserialize(d)?),
("NF", GameMode::Catch) => GameMod::NoFailCatch(Deserialize::deserialize(d)?),
("HT", GameMode::Catch) => GameMod::HalfTimeCatch(Deserialize::deserialize(d)?),
("DC", GameMode::Catch) => GameMod::DaycoreCatch(Deserialize::deserialize(d)?),
("HR", GameMode::Catch) => GameMod::HardRockCatch(Deserialize::deserialize(d)?),
("SD", GameMode::Catch) => GameMod::SuddenDeathCatch(Deserialize::deserialize(d)?),
("PF", GameMode::Catch) => GameMod::PerfectCatch(Deserialize::deserialize(d)?),
("DT", GameMode::Catch) => GameMod::DoubleTimeCatch(Deserialize::deserialize(d)?),
("NC", GameMode::Catch) => GameMod::NightcoreCatch(Deserialize::deserialize(d)?),
("HD", GameMode::Catch) => GameMod::HiddenCatch(Deserialize::deserialize(d)?),
("FL", GameMode::Catch) => GameMod::FlashlightCatch(Deserialize::deserialize(d)?),
("AC", GameMode::Catch) => {
GameMod::AccuracyChallengeCatch(Deserialize::deserialize(d)?)
}
("DA", GameMode::Catch) => {
GameMod::DifficultyAdjustCatch(Deserialize::deserialize(d)?)
}
("CL", GameMode::Catch) => GameMod::ClassicCatch(Deserialize::deserialize(d)?),
("MR", GameMode::Catch) => GameMod::MirrorCatch(Deserialize::deserialize(d)?),
("AT", GameMode::Catch) => GameMod::AutoplayCatch(Deserialize::deserialize(d)?),
("CN", GameMode::Catch) => GameMod::CinemaCatch(Deserialize::deserialize(d)?),
("RX", GameMode::Catch) => GameMod::RelaxCatch(Deserialize::deserialize(d)?),
("WU", GameMode::Catch) => GameMod::WindUpCatch(Deserialize::deserialize(d)?),
("WD", GameMode::Catch) => GameMod::WindDownCatch(Deserialize::deserialize(d)?),
("FF", GameMode::Catch) => {
GameMod::FloatingFruitsCatch(Deserialize::deserialize(d)?)
}
("MU", GameMode::Catch) => GameMod::MutedCatch(Deserialize::deserialize(d)?),
("NS", GameMode::Catch) => GameMod::NoScopeCatch(Deserialize::deserialize(d)?),
("SV2", GameMode::Catch) => GameMod::ScoreV2Catch(Deserialize::deserialize(d)?),
("EZ", GameMode::Mania) => GameMod::EasyMania(Deserialize::deserialize(d)?),
("NF", GameMode::Mania) => GameMod::NoFailMania(Deserialize::deserialize(d)?),
("HT", GameMode::Mania) => GameMod::HalfTimeMania(Deserialize::deserialize(d)?),
("DC", GameMode::Mania) => GameMod::DaycoreMania(Deserialize::deserialize(d)?),
("NR", GameMode::Mania) => GameMod::NoReleaseMania(Deserialize::deserialize(d)?),
("HR", GameMode::Mania) => GameMod::HardRockMania(Deserialize::deserialize(d)?),
("SD", GameMode::Mania) => GameMod::SuddenDeathMania(Deserialize::deserialize(d)?),
("PF", GameMode::Mania) => GameMod::PerfectMania(Deserialize::deserialize(d)?),
("DT", GameMode::Mania) => GameMod::DoubleTimeMania(Deserialize::deserialize(d)?),
("NC", GameMode::Mania) => GameMod::NightcoreMania(Deserialize::deserialize(d)?),
("FI", GameMode::Mania) => GameMod::FadeInMania(Deserialize::deserialize(d)?),
("HD", GameMode::Mania) => GameMod::HiddenMania(Deserialize::deserialize(d)?),
("CO", GameMode::Mania) => GameMod::CoverMania(Deserialize::deserialize(d)?),
("FL", GameMode::Mania) => GameMod::FlashlightMania(Deserialize::deserialize(d)?),
("AC", GameMode::Mania) => {
GameMod::AccuracyChallengeMania(Deserialize::deserialize(d)?)
}
("RD", GameMode::Mania) => GameMod::RandomMania(Deserialize::deserialize(d)?),
("DS", GameMode::Mania) => GameMod::DualStagesMania(Deserialize::deserialize(d)?),
("MR", GameMode::Mania) => GameMod::MirrorMania(Deserialize::deserialize(d)?),
("DA", GameMode::Mania) => {
GameMod::DifficultyAdjustMania(Deserialize::deserialize(d)?)
}
("CL", GameMode::Mania) => GameMod::ClassicMania(Deserialize::deserialize(d)?),
("IN", GameMode::Mania) => GameMod::InvertMania(Deserialize::deserialize(d)?),
("CS", GameMode::Mania) => {
GameMod::ConstantSpeedMania(Deserialize::deserialize(d)?)
}
("HO", GameMode::Mania) => GameMod::HoldOffMania(Deserialize::deserialize(d)?),
("1K", GameMode::Mania) => GameMod::OneKeyMania(Deserialize::deserialize(d)?),
("2K", GameMode::Mania) => GameMod::TwoKeysMania(Deserialize::deserialize(d)?),
("3K", GameMode::Mania) => GameMod::ThreeKeysMania(Deserialize::deserialize(d)?),
("4K", GameMode::Mania) => GameMod::FourKeysMania(Deserialize::deserialize(d)?),
("5K", GameMode::Mania) => GameMod::FiveKeysMania(Deserialize::deserialize(d)?),
("6K", GameMode::Mania) => GameMod::SixKeysMania(Deserialize::deserialize(d)?),
("7K", GameMode::Mania) => GameMod::SevenKeysMania(Deserialize::deserialize(d)?),
("8K", GameMode::Mania) => GameMod::EightKeysMania(Deserialize::deserialize(d)?),
("9K", GameMode::Mania) => GameMod::NineKeysMania(Deserialize::deserialize(d)?),
("10K", GameMode::Mania) => GameMod::TenKeysMania(Deserialize::deserialize(d)?),
("AT", GameMode::Mania) => GameMod::AutoplayMania(Deserialize::deserialize(d)?),
("CN", GameMode::Mania) => GameMod::CinemaMania(Deserialize::deserialize(d)?),
("WU", GameMode::Mania) => GameMod::WindUpMania(Deserialize::deserialize(d)?),
("WD", GameMode::Mania) => GameMod::WindDownMania(Deserialize::deserialize(d)?),
("MU", GameMode::Mania) => GameMod::MutedMania(Deserialize::deserialize(d)?),
("AS", GameMode::Mania) => {
GameMod::AdaptiveSpeedMania(Deserialize::deserialize(d)?)
}
("SV2", GameMode::Mania) => GameMod::ScoreV2Mania(Deserialize::deserialize(d)?),
_ => {
let acronym = <Acronym as std::str::FromStr>::from_str(self.acronym)
.map_err(DeError::custom)?;
#[allow(clippy::needless_update)]
let unknown = UnknownMod {
acronym,
..Deserialize::deserialize(d)?
};
match self.mode {
GameMode::Osu => GameMod::UnknownOsu(unknown),
GameMode::Taiko => GameMod::UnknownTaiko(unknown),
GameMode::Catch => GameMod::UnknownCatch(unknown),
GameMode::Mania => GameMod::UnknownMania(unknown),
}
}
};
Ok(res)
}
}
impl Serialize for GameMod {
fn serialize<S: Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
let mut s = s.serialize_map(None)?;
s.serialize_entry("acronym", self.acronym().as_str())?;
match self {
Self::EasyOsu(m) => {
let has_some = m.retries.is_some();
if has_some {
s.serialize_entry("settings", m)?;
}
}
Self::HalfTimeOsu(m) => {
let has_some = m.speed_change.is_some() || m.adjust_pitch.is_some();
if has_some {
s.serialize_entry("settings", m)?;
}
}
Self::DaycoreOsu(m) => {
let has_some = m.speed_change.is_some();
if has_some {
s.serialize_entry("settings", m)?;
}
}
Self::SuddenDeathOsu(m) => {
let has_some = m.restart.is_some();
if has_some {
s.serialize_entry("settings", m)?;
}
}
Self::PerfectOsu(m) => {
let has_some = m.restart.is_some();
if has_some {
s.serialize_entry("settings", m)?;
}
}
Self::DoubleTimeOsu(m) => {
let has_some = m.speed_change.is_some() || m.adjust_pitch.is_some();
if has_some {
s.serialize_entry("settings", m)?;
}
}
Self::NightcoreOsu(m) => {
let has_some = m.speed_change.is_some();
if has_some {
s.serialize_entry("settings", m)?;
}
}
Self::HiddenOsu(m) => {
let has_some = m.only_fade_approach_circles.is_some();
if has_some {
s.serialize_entry("settings", m)?;
}
}
Self::FlashlightOsu(m) => {
let has_some = m.follow_delay.is_some()
|| m.size_multiplier.is_some()
|| m.combo_based_size.is_some();
if has_some {
s.serialize_entry("settings", m)?;
}
}
Self::AccuracyChallengeOsu(m) => {
let has_some = m.minimum_accuracy.is_some()
|| m.accuracy_judge_mode.is_some()
|| m.restart.is_some();
if has_some {
s.serialize_entry("settings", m)?;
}
}
Self::TargetPracticeOsu(m) => {
let has_some = m.seed.is_some() || m.metronome.is_some();
if has_some {
s.serialize_entry("settings", m)?;
}
}
Self::DifficultyAdjustOsu(m) => {
let has_some = m.circle_size.is_some()
|| m.approach_rate.is_some()
|| m.drain_rate.is_some()
|| m.overall_difficulty.is_some()
|| m.extended_limits.is_some();
if has_some {
s.serialize_entry("settings", m)?;
}
}
Self::ClassicOsu(m) => {
let has_some = m.no_slider_head_accuracy.is_some()
|| m.classic_note_lock.is_some()
|| m.always_play_tail_sample.is_some()
|| m.fade_hit_circle_early.is_some()
|| m.classic_health.is_some();
if has_some {
s.serialize_entry("settings", m)?;
}
}
Self::RandomOsu(m) => {
let has_some = m.angle_sharpness.is_some() || m.seed.is_some();
if has_some {
s.serialize_entry("settings", m)?;
}
}
Self::MirrorOsu(m) => {
let has_some = m.reflection.is_some();
if has_some {
s.serialize_entry("settings", m)?;
}
}
Self::WiggleOsu(m) => {
let has_some = m.strength.is_some();
if has_some {
s.serialize_entry("settings", m)?;
}
}
Self::GrowOsu(m) => {
let has_some = m.start_scale.is_some();
if has_some {
s.serialize_entry("settings", m)?;
}
}
Self::DeflateOsu(m) => {
let has_some = m.start_scale.is_some();
if has_some {
s.serialize_entry("settings", m)?;
}
}
Self::WindUpOsu(m) => {
let has_some = m.initial_rate.is_some()
|| m.final_rate.is_some()
|| m.adjust_pitch.is_some();
if has_some {
s.serialize_entry("settings", m)?;
}
}
Self::WindDownOsu(m) => {
let has_some = m.initial_rate.is_some()
|| m.final_rate.is_some()
|| m.adjust_pitch.is_some();
if has_some {
s.serialize_entry("settings", m)?;
}
}
Self::BarrelRollOsu(m) => {
let has_some = m.spin_speed.is_some() || m.direction.is_some();
if has_some {
s.serialize_entry("settings", m)?;
}
}
Self::ApproachDifferentOsu(m) => {
let has_some = m.scale.is_some() || m.style.is_some();
if has_some {
s.serialize_entry("settings", m)?;
}
}
Self::MutedOsu(m) => {
let has_some = m.inverse_muting.is_some()
|| m.enable_metronome.is_some()
|| m.mute_combo_count.is_some()
|| m.affects_hit_sounds.is_some();
if has_some {
s.serialize_entry("settings", m)?;
}
}
Self::NoScopeOsu(m) => {
let has_some = m.hidden_combo_count.is_some();
if has_some {
s.serialize_entry("settings", m)?;
}
}
Self::MagnetisedOsu(m) => {
let has_some = m.attraction_strength.is_some();
if has_some {
s.serialize_entry("settings", m)?;
}
}
Self::RepelOsu(m) => {
let has_some = m.repulsion_strength.is_some();
if has_some {
s.serialize_entry("settings", m)?;
}
}
Self::AdaptiveSpeedOsu(m) => {
let has_some = m.initial_rate.is_some() || m.adjust_pitch.is_some();
if has_some {
s.serialize_entry("settings", m)?;
}
}
Self::DepthOsu(m) => {
let has_some = m.max_depth.is_some() || m.show_approach_circles.is_some();
if has_some {
s.serialize_entry("settings", m)?;
}
}
Self::HalfTimeTaiko(m) => {
let has_some = m.speed_change.is_some() || m.adjust_pitch.is_some();
if has_some {
s.serialize_entry("settings", m)?;
}
}
Self::DaycoreTaiko(m) => {
let has_some = m.speed_change.is_some();
if has_some {
s.serialize_entry("settings", m)?;
}
}
Self::SuddenDeathTaiko(m) => {
let has_some = m.restart.is_some();
if has_some {
s.serialize_entry("settings", m)?;
}
}
Self::PerfectTaiko(m) => {
let has_some = m.restart.is_some();
if has_some {
s.serialize_entry("settings", m)?;
}
}
Self::DoubleTimeTaiko(m) => {
let has_some = m.speed_change.is_some() || m.adjust_pitch.is_some();
if has_some {
s.serialize_entry("settings", m)?;
}
}
Self::NightcoreTaiko(m) => {
let has_some = m.speed_change.is_some();
if has_some {
s.serialize_entry("settings", m)?;
}
}
Self::FlashlightTaiko(m) => {
let has_some = m.size_multiplier.is_some() || m.combo_based_size.is_some();
if has_some {
s.serialize_entry("settings", m)?;
}
}
Self::AccuracyChallengeTaiko(m) => {
let has_some = m.minimum_accuracy.is_some()
|| m.accuracy_judge_mode.is_some()
|| m.restart.is_some();
if has_some {
s.serialize_entry("settings", m)?;
}
}
Self::RandomTaiko(m) => {
let has_some = m.seed.is_some();
if has_some {
s.serialize_entry("settings", m)?;
}
}
Self::DifficultyAdjustTaiko(m) => {
let has_some = m.scroll_speed.is_some()
|| m.drain_rate.is_some()
|| m.overall_difficulty.is_some()
|| m.extended_limits.is_some();
if has_some {
s.serialize_entry("settings", m)?;
}
}
Self::WindUpTaiko(m) => {
let has_some = m.initial_rate.is_some()
|| m.final_rate.is_some()
|| m.adjust_pitch.is_some();
if has_some {
s.serialize_entry("settings", m)?;
}
}
Self::WindDownTaiko(m) => {
let has_some = m.initial_rate.is_some()
|| m.final_rate.is_some()
|| m.adjust_pitch.is_some();
if has_some {
s.serialize_entry("settings", m)?;
}
}
Self::MutedTaiko(m) => {
let has_some = m.inverse_muting.is_some()
|| m.enable_metronome.is_some()
|| m.mute_combo_count.is_some()
|| m.affects_hit_sounds.is_some();
if has_some {
s.serialize_entry("settings", m)?;
}
}
Self::AdaptiveSpeedTaiko(m) => {
let has_some = m.initial_rate.is_some() || m.adjust_pitch.is_some();
if has_some {
s.serialize_entry("settings", m)?;
}
}
Self::EasyCatch(m) => {
let has_some = m.retries.is_some();
if has_some {
s.serialize_entry("settings", m)?;
}
}
Self::HalfTimeCatch(m) => {
let has_some = m.speed_change.is_some() || m.adjust_pitch.is_some();
if has_some {
s.serialize_entry("settings", m)?;
}
}
Self::DaycoreCatch(m) => {
let has_some = m.speed_change.is_some();
if has_some {
s.serialize_entry("settings", m)?;
}
}
Self::SuddenDeathCatch(m) => {
let has_some = m.restart.is_some();
if has_some {
s.serialize_entry("settings", m)?;
}
}
Self::PerfectCatch(m) => {
let has_some = m.restart.is_some();
if has_some {
s.serialize_entry("settings", m)?;
}
}
Self::DoubleTimeCatch(m) => {
let has_some = m.speed_change.is_some() || m.adjust_pitch.is_some();
if has_some {
s.serialize_entry("settings", m)?;
}
}
Self::NightcoreCatch(m) => {
let has_some = m.speed_change.is_some();
if has_some {
s.serialize_entry("settings", m)?;
}
}
Self::FlashlightCatch(m) => {
let has_some = m.size_multiplier.is_some() || m.combo_based_size.is_some();
if has_some {
s.serialize_entry("settings", m)?;
}
}
Self::AccuracyChallengeCatch(m) => {
let has_some = m.minimum_accuracy.is_some()
|| m.accuracy_judge_mode.is_some()
|| m.restart.is_some();
if has_some {
s.serialize_entry("settings", m)?;
}
}
Self::DifficultyAdjustCatch(m) => {
let has_some = m.circle_size.is_some()
|| m.approach_rate.is_some()
|| m.hard_rock_offsets.is_some()
|| m.drain_rate.is_some()
|| m.overall_difficulty.is_some()
|| m.extended_limits.is_some();
if has_some {
s.serialize_entry("settings", m)?;
}
}
Self::WindUpCatch(m) => {
let has_some = m.initial_rate.is_some()
|| m.final_rate.is_some()
|| m.adjust_pitch.is_some();
if has_some {
s.serialize_entry("settings", m)?;
}
}
Self::WindDownCatch(m) => {
let has_some = m.initial_rate.is_some()
|| m.final_rate.is_some()
|| m.adjust_pitch.is_some();
if has_some {
s.serialize_entry("settings", m)?;
}
}
Self::MutedCatch(m) => {
let has_some = m.inverse_muting.is_some()
|| m.enable_metronome.is_some()
|| m.mute_combo_count.is_some()
|| m.affects_hit_sounds.is_some();
if has_some {
s.serialize_entry("settings", m)?;
}
}
Self::NoScopeCatch(m) => {
let has_some = m.hidden_combo_count.is_some();
if has_some {
s.serialize_entry("settings", m)?;
}
}
Self::EasyMania(m) => {
let has_some = m.retries.is_some();
if has_some {
s.serialize_entry("settings", m)?;
}
}
Self::HalfTimeMania(m) => {
let has_some = m.speed_change.is_some() || m.adjust_pitch.is_some();
if has_some {
s.serialize_entry("settings", m)?;
}
}
Self::DaycoreMania(m) => {
let has_some = m.speed_change.is_some();
if has_some {
s.serialize_entry("settings", m)?;
}
}
Self::SuddenDeathMania(m) => {
let has_some = m.restart.is_some();
if has_some {
s.serialize_entry("settings", m)?;
}
}
Self::PerfectMania(m) => {
let has_some = m.restart.is_some();
if has_some {
s.serialize_entry("settings", m)?;
}
}
Self::DoubleTimeMania(m) => {
let has_some = m.speed_change.is_some() || m.adjust_pitch.is_some();
if has_some {
s.serialize_entry("settings", m)?;
}
}
Self::NightcoreMania(m) => {
let has_some = m.speed_change.is_some();
if has_some {
s.serialize_entry("settings", m)?;
}
}
Self::CoverMania(m) => {
let has_some = m.coverage.is_some() || m.direction.is_some();
if has_some {
s.serialize_entry("settings", m)?;
}
}
Self::FlashlightMania(m) => {
let has_some = m.size_multiplier.is_some() || m.combo_based_size.is_some();
if has_some {
s.serialize_entry("settings", m)?;
}
}
Self::AccuracyChallengeMania(m) => {
let has_some = m.minimum_accuracy.is_some()
|| m.accuracy_judge_mode.is_some()
|| m.restart.is_some();
if has_some {
s.serialize_entry("settings", m)?;
}
}
Self::RandomMania(m) => {
let has_some = m.seed.is_some();
if has_some {
s.serialize_entry("settings", m)?;
}
}
Self::DifficultyAdjustMania(m) => {
let has_some = m.drain_rate.is_some()
|| m.overall_difficulty.is_some()
|| m.extended_limits.is_some();
if has_some {
s.serialize_entry("settings", m)?;
}
}
Self::WindUpMania(m) => {
let has_some = m.initial_rate.is_some()
|| m.final_rate.is_some()
|| m.adjust_pitch.is_some();
if has_some {
s.serialize_entry("settings", m)?;
}
}
Self::WindDownMania(m) => {
let has_some = m.initial_rate.is_some()
|| m.final_rate.is_some()
|| m.adjust_pitch.is_some();
if has_some {
s.serialize_entry("settings", m)?;
}
}
Self::MutedMania(m) => {
let has_some = m.inverse_muting.is_some()
|| m.enable_metronome.is_some()
|| m.mute_combo_count.is_some()
|| m.affects_hit_sounds.is_some();
if has_some {
s.serialize_entry("settings", m)?;
}
}
Self::AdaptiveSpeedMania(m) => {
let has_some = m.initial_rate.is_some() || m.adjust_pitch.is_some();
if has_some {
s.serialize_entry("settings", m)?;
}
}
_ => {}
}
s.end()
}
}
impl<'de> Deserialize<'de> for GameModIntermode {
fn deserialize<D: Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
fn try_acronym_to_gamemod<E: DeError>(
acronym: &MaybeOwnedStr<'_>,
) -> Result<GameModIntermode, E> {
acronym
.as_str()
.parse()
.map(GameModIntermode::from_acronym)
.map_err(DeError::custom)
}
match GameModRaw::deserialize(d)? {
GameModRaw::Bits(bits) => GameModIntermode::try_from_bits(bits)
.ok_or_else(|| DeError::custom("invalid bitflags")),
GameModRaw::Acronym(acronym) => try_acronym_to_gamemod(&acronym),
GameModRaw::Full { acronym, .. } => try_acronym_to_gamemod(&acronym),
}
}
}
impl serde::Serialize for GameModIntermode {
fn serialize<S: serde::Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
s.serialize_str(self.acronym().as_str())
}
}
impl GameModSettings<'_> {
pub(crate) fn try_deserialize(&self, acronym: &str) -> Option<GameMod> {
macro_rules! try_deser {
( $osu_mod:ident, $taiko_mod:ident, $catch_mod:ident, $mania_mod:ident, ) => {{
try_deser!(@ $osu_mod Osu);
try_deser!(@ $taiko_mod Taiko);
try_deser!(@ $catch_mod Catch);
try_deser!(@ $mania_mod Mania);
}};
( @ Skip_ $mode:ident ) => {};
( @ $name:ident $mode:ident ) => {
if let Ok(m) = $name::deserialize(self) {
return Some(GameMod::$name(m));
}
};
}
match acronym {
"10K" => try_deser!(Skip_, Skip_, Skip_, TenKeysMania,),
"1K" => try_deser!(Skip_, Skip_, Skip_, OneKeyMania,),
"2K" => try_deser!(Skip_, Skip_, Skip_, TwoKeysMania,),
"3K" => try_deser!(Skip_, Skip_, Skip_, ThreeKeysMania,),
"4K" => try_deser!(Skip_, Skip_, Skip_, FourKeysMania,),
"5K" => try_deser!(Skip_, Skip_, Skip_, FiveKeysMania,),
"6K" => try_deser!(Skip_, Skip_, Skip_, SixKeysMania,),
"7K" => try_deser!(Skip_, Skip_, Skip_, SevenKeysMania,),
"8K" => try_deser!(Skip_, Skip_, Skip_, EightKeysMania,),
"9K" => try_deser!(Skip_, Skip_, Skip_, NineKeysMania,),
"AC" => try_deser!(
AccuracyChallengeOsu,
AccuracyChallengeTaiko,
AccuracyChallengeCatch,
AccuracyChallengeMania,
),
"AD" => try_deser!(ApproachDifferentOsu, Skip_, Skip_, Skip_,),
"AL" => try_deser!(AlternateOsu, Skip_, Skip_, Skip_,),
"AP" => try_deser!(AutopilotOsu, Skip_, Skip_, Skip_,),
"AS" => try_deser!(
AdaptiveSpeedOsu,
AdaptiveSpeedTaiko,
Skip_,
AdaptiveSpeedMania,
),
"AT" => try_deser!(AutoplayOsu, AutoplayTaiko, AutoplayCatch, AutoplayMania,),
"BL" => try_deser!(BlindsOsu, Skip_, Skip_, Skip_,),
"BR" => try_deser!(BarrelRollOsu, Skip_, Skip_, Skip_,),
"BU" => try_deser!(BubblesOsu, Skip_, Skip_, Skip_,),
"CL" => try_deser!(ClassicOsu, ClassicTaiko, ClassicCatch, ClassicMania,),
"CN" => try_deser!(CinemaOsu, CinemaTaiko, CinemaCatch, CinemaMania,),
"CO" => try_deser!(Skip_, Skip_, Skip_, CoverMania,),
"CS" => try_deser!(Skip_, ConstantSpeedTaiko, Skip_, ConstantSpeedMania,),
"DA" => try_deser!(
DifficultyAdjustOsu,
DifficultyAdjustTaiko,
DifficultyAdjustCatch,
DifficultyAdjustMania,
),
"DC" => try_deser!(DaycoreOsu, DaycoreTaiko, DaycoreCatch, DaycoreMania,),
"DF" => try_deser!(DeflateOsu, Skip_, Skip_, Skip_,),
"DP" => try_deser!(DepthOsu, Skip_, Skip_, Skip_,),
"DS" => try_deser!(Skip_, Skip_, Skip_, DualStagesMania,),
"DT" => try_deser!(
DoubleTimeOsu,
DoubleTimeTaiko,
DoubleTimeCatch,
DoubleTimeMania,
),
"EZ" => try_deser!(EasyOsu, EasyTaiko, EasyCatch, EasyMania,),
"FF" => try_deser!(Skip_, Skip_, FloatingFruitsCatch, Skip_,),
"FI" => try_deser!(Skip_, Skip_, Skip_, FadeInMania,),
"FL" => try_deser!(
FlashlightOsu,
FlashlightTaiko,
FlashlightCatch,
FlashlightMania,
),
"FR" => try_deser!(FreezeFrameOsu, Skip_, Skip_, Skip_,),
"GR" => try_deser!(GrowOsu, Skip_, Skip_, Skip_,),
"HD" => try_deser!(HiddenOsu, HiddenTaiko, HiddenCatch, HiddenMania,),
"HO" => try_deser!(Skip_, Skip_, Skip_, HoldOffMania,),
"HR" => try_deser!(HardRockOsu, HardRockTaiko, HardRockCatch, HardRockMania,),
"HT" => try_deser!(HalfTimeOsu, HalfTimeTaiko, HalfTimeCatch, HalfTimeMania,),
"IN" => try_deser!(Skip_, Skip_, Skip_, InvertMania,),
"MG" => try_deser!(MagnetisedOsu, Skip_, Skip_, Skip_,),
"MR" => try_deser!(MirrorOsu, Skip_, MirrorCatch, MirrorMania,),
"MU" => try_deser!(MutedOsu, MutedTaiko, MutedCatch, MutedMania,),
"NC" => try_deser!(NightcoreOsu, NightcoreTaiko, NightcoreCatch, NightcoreMania,),
"NF" => try_deser!(NoFailOsu, NoFailTaiko, NoFailCatch, NoFailMania,),
"NR" => try_deser!(Skip_, Skip_, Skip_, NoReleaseMania,),
"NS" => try_deser!(NoScopeOsu, Skip_, NoScopeCatch, Skip_,),
"PF" => try_deser!(PerfectOsu, PerfectTaiko, PerfectCatch, PerfectMania,),
"RD" => try_deser!(RandomOsu, RandomTaiko, Skip_, RandomMania,),
"RP" => try_deser!(RepelOsu, Skip_, Skip_, Skip_,),
"RX" => try_deser!(RelaxOsu, RelaxTaiko, RelaxCatch, Skip_,),
"SD" => try_deser!(
SuddenDeathOsu,
SuddenDeathTaiko,
SuddenDeathCatch,
SuddenDeathMania,
),
"SG" => try_deser!(SingleTapOsu, SingleTapTaiko, Skip_, Skip_,),
"SI" => try_deser!(SpinInOsu, Skip_, Skip_, Skip_,),
"SO" => try_deser!(SpunOutOsu, Skip_, Skip_, Skip_,),
"ST" => try_deser!(StrictTrackingOsu, Skip_, Skip_, Skip_,),
"SV2" => try_deser!(ScoreV2Osu, ScoreV2Taiko, ScoreV2Catch, ScoreV2Mania,),
"SW" => try_deser!(Skip_, SwapTaiko, Skip_, Skip_,),
"SY" => try_deser!(SynesthesiaOsu, Skip_, Skip_, Skip_,),
"TC" => try_deser!(TraceableOsu, Skip_, Skip_, Skip_,),
"TD" => try_deser!(TouchDeviceOsu, Skip_, Skip_, Skip_,),
"TP" => try_deser!(TargetPracticeOsu, Skip_, Skip_, Skip_,),
"TR" => try_deser!(TransformOsu, Skip_, Skip_, Skip_,),
"WD" => try_deser!(WindDownOsu, WindDownTaiko, WindDownCatch, WindDownMania,),
"WG" => try_deser!(WiggleOsu, Skip_, Skip_, Skip_,),
"WU" => try_deser!(WindUpOsu, WindUpTaiko, WindUpCatch, WindUpMania,),
_ => {}
}
None
}
}
};
#[macro_export(local_inner_macros)]
#[cfg(feature = "macros")]
#[doc(hidden)]
macro_rules! mods_inner {
( @ $mode:ident: $( $acronym:tt )* ) => {{
let _ = $crate::GameMode::$mode;
#[allow(unused_mut)]
let mut mods = $crate::GameMods::new();
$( mods.insert(mods_inner!(< ! $mode $acronym)(Default::default())); )*
mods
}};
( @ $( $acronym:tt )* ) => {{
#[allow(unused_mut)]
let mut mods = $crate::GameModsIntermode::new();
$( mods.insert(mods_inner!(< $acronym)); )*
mods
}};
( < $( ! $mode:ident )? 10K ) => { mods_inner!(> $( $mode )? TenKeys ) };
( < $( ! $mode:ident )? 1K ) => { mods_inner!(> $( $mode )? OneKey ) };
( < $( ! $mode:ident )? 2K ) => { mods_inner!(> $( $mode )? TwoKeys ) };
( < $( ! $mode:ident )? 3K ) => { mods_inner!(> $( $mode )? ThreeKeys ) };
( < $( ! $mode:ident )? 4K ) => { mods_inner!(> $( $mode )? FourKeys ) };
( < $( ! $mode:ident )? 5K ) => { mods_inner!(> $( $mode )? FiveKeys ) };
( < $( ! $mode:ident )? 6K ) => { mods_inner!(> $( $mode )? SixKeys ) };
( < $( ! $mode:ident )? 7K ) => { mods_inner!(> $( $mode )? SevenKeys ) };
( < $( ! $mode:ident )? 8K ) => { mods_inner!(> $( $mode )? EightKeys ) };
( < $( ! $mode:ident )? 9K ) => { mods_inner!(> $( $mode )? NineKeys ) };
( < $( ! $mode:ident )? AC ) => { mods_inner!(> $( $mode )? AccuracyChallenge ) };
( < $( ! $mode:ident )? AD ) => { mods_inner!(> $( $mode )? ApproachDifferent ) };
( < $( ! $mode:ident )? AL ) => { mods_inner!(> $( $mode )? Alternate ) };
( < $( ! $mode:ident )? AP ) => { mods_inner!(> $( $mode )? Autopilot ) };
( < $( ! $mode:ident )? AS ) => { mods_inner!(> $( $mode )? AdaptiveSpeed ) };
( < $( ! $mode:ident )? AT ) => { mods_inner!(> $( $mode )? Autoplay ) };
( < $( ! $mode:ident )? BL ) => { mods_inner!(> $( $mode )? Blinds ) };
( < $( ! $mode:ident )? BR ) => { mods_inner!(> $( $mode )? BarrelRoll ) };
( < $( ! $mode:ident )? BU ) => { mods_inner!(> $( $mode )? Bubbles ) };
( < $( ! $mode:ident )? CL ) => { mods_inner!(> $( $mode )? Classic ) };
( < $( ! $mode:ident )? CN ) => { mods_inner!(> $( $mode )? Cinema ) };
( < $( ! $mode:ident )? CO ) => { mods_inner!(> $( $mode )? Cover ) };
( < $( ! $mode:ident )? CS ) => { mods_inner!(> $( $mode )? ConstantSpeed ) };
( < $( ! $mode:ident )? DA ) => { mods_inner!(> $( $mode )? DifficultyAdjust ) };
( < $( ! $mode:ident )? DC ) => { mods_inner!(> $( $mode )? Daycore ) };
( < $( ! $mode:ident )? DF ) => { mods_inner!(> $( $mode )? Deflate ) };
( < $( ! $mode:ident )? DP ) => { mods_inner!(> $( $mode )? Depth ) };
( < $( ! $mode:ident )? DS ) => { mods_inner!(> $( $mode )? DualStages ) };
( < $( ! $mode:ident )? DT ) => { mods_inner!(> $( $mode )? DoubleTime ) };
( < $( ! $mode:ident )? EZ ) => { mods_inner!(> $( $mode )? Easy ) };
( < $( ! $mode:ident )? FF ) => { mods_inner!(> $( $mode )? FloatingFruits ) };
( < $( ! $mode:ident )? FI ) => { mods_inner!(> $( $mode )? FadeIn ) };
( < $( ! $mode:ident )? FL ) => { mods_inner!(> $( $mode )? Flashlight ) };
( < $( ! $mode:ident )? FR ) => { mods_inner!(> $( $mode )? FreezeFrame ) };
( < $( ! $mode:ident )? GR ) => { mods_inner!(> $( $mode )? Grow ) };
( < $( ! $mode:ident )? HD ) => { mods_inner!(> $( $mode )? Hidden ) };
( < $( ! $mode:ident )? HO ) => { mods_inner!(> $( $mode )? HoldOff ) };
( < $( ! $mode:ident )? HR ) => { mods_inner!(> $( $mode )? HardRock ) };
( < $( ! $mode:ident )? HT ) => { mods_inner!(> $( $mode )? HalfTime ) };
( < $( ! $mode:ident )? IN ) => { mods_inner!(> $( $mode )? Invert ) };
( < $( ! $mode:ident )? MG ) => { mods_inner!(> $( $mode )? Magnetised ) };
( < $( ! $mode:ident )? MR ) => { mods_inner!(> $( $mode )? Mirror ) };
( < $( ! $mode:ident )? MU ) => { mods_inner!(> $( $mode )? Muted ) };
( < $( ! $mode:ident )? NC ) => { mods_inner!(> $( $mode )? Nightcore ) };
( < $( ! $mode:ident )? NF ) => { mods_inner!(> $( $mode )? NoFail ) };
( < $( ! $mode:ident )? NR ) => { mods_inner!(> $( $mode )? NoRelease ) };
( < $( ! $mode:ident )? NS ) => { mods_inner!(> $( $mode )? NoScope ) };
( < $( ! $mode:ident )? PF ) => { mods_inner!(> $( $mode )? Perfect ) };
( < $( ! $mode:ident )? RD ) => { mods_inner!(> $( $mode )? Random ) };
( < $( ! $mode:ident )? RP ) => { mods_inner!(> $( $mode )? Repel ) };
( < $( ! $mode:ident )? RX ) => { mods_inner!(> $( $mode )? Relax ) };
( < $( ! $mode:ident )? SD ) => { mods_inner!(> $( $mode )? SuddenDeath ) };
( < $( ! $mode:ident )? SG ) => { mods_inner!(> $( $mode )? SingleTap ) };
( < $( ! $mode:ident )? SI ) => { mods_inner!(> $( $mode )? SpinIn ) };
( < $( ! $mode:ident )? SO ) => { mods_inner!(> $( $mode )? SpunOut ) };
( < $( ! $mode:ident )? ST ) => { mods_inner!(> $( $mode )? StrictTracking ) };
( < $( ! $mode:ident )? SV2 ) => { mods_inner!(> $( $mode )? ScoreV2 ) };
( < $( ! $mode:ident )? SW ) => { mods_inner!(> $( $mode )? Swap ) };
( < $( ! $mode:ident )? SY ) => { mods_inner!(> $( $mode )? Synesthesia ) };
( < $( ! $mode:ident )? TC ) => { mods_inner!(> $( $mode )? Traceable ) };
( < $( ! $mode:ident )? TD ) => { mods_inner!(> $( $mode )? TouchDevice ) };
( < $( ! $mode:ident )? TP ) => { mods_inner!(> $( $mode )? TargetPractice ) };
( < $( ! $mode:ident )? TR ) => { mods_inner!(> $( $mode )? Transform ) };
( < $( ! $mode:ident )? WD ) => { mods_inner!(> $( $mode )? WindDown ) };
( < $( ! $mode:ident )? WG ) => { mods_inner!(> $( $mode )? Wiggle ) };
( < $( ! $mode:ident )? WU ) => { mods_inner!(> $( $mode )? WindUp ) };
( < ! $mode:ident $other:tt $( $rest:tt )* ) => { mods_inner!(<< $other) };
( < $other:tt $( $rest:tt )* ) => { mods_inner!(<< $other) };
( << $other:tt ) => {
std::compile_error!(std::concat!("unknown mod acronym `", std::stringify!($other), "`"))
};
( > $mode:ident $name:ident ) => {
$crate::macros::paste! { $crate::generated_mods::GameMod::[<$name $mode>] }
};
( > $name:ident ) => {
$crate::generated_mods::GameModIntermode::$name
};
}