quaver-rs 0.1.0

A Rust library for parsing and analyzing Quaver rhythm game maps
Documentation
use crate::enums::GameMode;

/// Map metadata information
#[derive(Debug, Clone)]
pub struct MapMetadata {
    /// The name of the audio file
    pub audio_file: String,
    
    /// Time in milliseconds of the song where the preview starts
    pub song_preview_time: i32,
    
    /// The name of the background file
    pub background_file: String,
    
    /// The name of the mapset banner
    pub banner_file: String,
    
    /// The unique Map Identifier (-1 if not submitted)
    pub map_id: i32,
    
    /// The unique Map Set identifier (-1 if not submitted)
    pub map_set_id: i32,
    
    /// The title of the song
    pub title: String,
    
    /// The artist of the song
    pub artist: String,
    
    /// The source of the song (album, mixtape, etc.)
    pub source: String,
    
    /// Any tags that could be used to help find the song
    pub tags: String,
    
    /// The creator of the map
    pub creator: String,
    
    /// The difficulty name of the map
    pub difficulty_name: String,
    
    /// A description about this map
    pub description: String,
    
    /// The genre of the song
    pub genre: String,
    
    /// Whether to use legacy LN rendering
    pub legacy_ln_rendering: bool,
    
    /// Whether BPM does not affect scroll velocity
    pub bpm_does_not_affect_scroll_velocity: bool,
    
    /// Whether the map has a scratch key
    pub has_scratch_key: bool,
    
    /// The game mode for this map
    pub mode: GameMode,
    
    /// Randomize modifier seed (-1 if not set)
    pub randomize_modifier_seed: i32,
}

impl Default for MapMetadata {
    fn default() -> Self {
        Self {
            audio_file: String::new(),
            song_preview_time: 0,
            background_file: String::new(),
            banner_file: String::new(),
            map_id: -1,
            map_set_id: -1,
            title: String::new(),
            artist: String::new(),
            source: String::new(),
            tags: String::new(),
            creator: String::new(),
            difficulty_name: String::new(),
            description: String::new(),
            genre: String::new(),
            legacy_ln_rendering: false,
            bpm_does_not_affect_scroll_velocity: false,
            has_scratch_key: false,
            mode: GameMode::Keys4,
            randomize_modifier_seed: -1,
        }
    }
}