macro_rules! mods {
( Osu $( : $( $acronym:tt )* )? ) => { ... };
( Taiko $( : $( $acronym:tt )* )? ) => { ... };
( Catch $( : $( $acronym:tt )* )? ) => { ... };
( Mania $( : $( $acronym:tt )* )? ) => { ... };
( $( $acronym:tt )* ) => { ... };
}Available on crate feature
macros only.Expand description
Short-hand macro to easily create GameMods or GameModsIntermode.
To create GameModsIntermode, specify a space-separated list of
acronyms.
To create GameMods, specify Osu, Taiko, Catch, or Mania,
followed by a colon (:), followed by a space-separated list of acronyms.
ยงExample
let mods: GameMods = mods!(Taiko: NC HR);
assert_eq!(mods.to_string(), "HRNC");
let mods: GameModsIntermode = mods!(DT HR TC);
assert_eq!(mods.to_string(), "DTHRTC");