Struct bms_rs::parse::header::Header

source ·
pub struct Header {
Show 33 fields pub player: Option<PlayerMode>, pub genre: Option<String>, pub title: Option<String>, pub subtitle: Option<String>, pub artist: Option<String>, pub sub_artist: Option<String>, pub maker: Option<String>, pub comment: Option<Vec<String>>, pub email: Option<String>, pub url: Option<String>, pub options: Option<Vec<String>>, pub bpm: Option<f64>, pub play_level: Option<u8>, pub rank: Option<JudgeLevel>, pub difficulty: Option<u8>, pub total: Option<f64>, pub volume: Volume, pub ln_type: LnType, pub poor_bga_mode: PoorMode, pub back_bmp: Option<PathBuf>, pub stage_file: Option<PathBuf>, pub banner: Option<PathBuf>, pub is_octave: bool, pub midi_file: Option<PathBuf>, pub video_file: Option<PathBuf>, pub wav_path_root: Option<PathBuf>, pub wav_files: HashMap<ObjId, PathBuf>, pub poor_bmp: Option<PathBuf>, pub bmp_files: HashMap<ObjId, Bmp>, pub bpm_changes: HashMap<ObjId, f64>, pub texts: HashMap<ObjId, String>, pub change_options: HashMap<ObjId, String>, pub stops: HashMap<ObjId, u32>,
}
Expand description

A header parsed from TokenStream.

Fields§

§player: Option<PlayerMode>

The play style of the score.

§genre: Option<String>

The genre of the score.

§title: Option<String>

The title of the score.

§subtitle: Option<String>

The subtitle of the score.

§artist: Option<String>

The artist of the music in the score.

§sub_artist: Option<String>

The co-artist of the music in the score.

§maker: Option<String>

Who placed the notes into the score.

§comment: Option<Vec<String>>

The text messages of the score. It may be closed with double quotes.

§email: Option<String>

The email address of the author.

§url: Option<String>

The url of the author.

§options: Option<Vec<String>>

The message for overriding options of some BMS player.

§bpm: Option<f64>

The initial BPM of the score.

§play_level: Option<u8>

The play level of the score.

§rank: Option<JudgeLevel>

The judgement level of the score.

§difficulty: Option<u8>

The difficulty of the score.

§total: Option<f64>

The total gauge percentage when all notes is got as PERFECT.

§volume: Volume

The volume of the score.

§ln_type: LnType

The LN notation type of the score.

§poor_bga_mode: PoorMode

The display mode for background image/video.

§back_bmp: Option<PathBuf>

The path of background image, which is shown while playing the score.

§stage_file: Option<PathBuf>

The path of splash screen image, which is shown before playing the score.

§banner: Option<PathBuf>

The path of banner image.

§is_octave: bool

Whether the score is the octave mode.

§midi_file: Option<PathBuf>

The path of MIDI file, which is played as BGM while playing the score.

§video_file: Option<PathBuf>

The path of the background video. The video should be started the playing from the section 000.

§wav_path_root: Option<PathBuf>

The path to override the base path of the WAV file path.

§wav_files: HashMap<ObjId, PathBuf>

The WAV file paths corresponding to the id of the note object.

§poor_bmp: Option<PathBuf>

The path of image, which is shown when the player got POOR.

§bmp_files: HashMap<ObjId, Bmp>

The BMP file paths corresponding to the id of the background image/video object.

§bpm_changes: HashMap<ObjId, f64>

The BPMs corresponding to the id of the BPM change object.

§texts: HashMap<ObjId, String>

The texts corresponding to the id of the text object.

§change_options: HashMap<ObjId, String>

The option messages corresponding to the id of the change option object.

§stops: HashMap<ObjId, u32>

Stop lengths by stop object id.

Trait Implementations§

source§

impl Clone for Header

source§

fn clone(&self) -> Header

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for Header

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for Header

source§

fn default() -> Header

Returns the “default value” for a type. Read more
source§

impl PartialEq<Header> for Header

source§

fn eq(&self, other: &Header) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl StructuralPartialEq for Header

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

const: unstable · source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

const: unstable · source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

const: unstable · source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere U: From<T>,

const: unstable · source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> ToOwned for Twhere T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
const: unstable · source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
const: unstable · source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.