Struct Header

Source
pub struct Header {
Show 35 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 scrolling_factor_changes: HashMap<ObjId, f64>, pub spacing_factor_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.

§scrolling_factor_changes: HashMap<ObjId, f64>

The scrolling factors corresponding to the id of the scroll speed change object.

§spacing_factor_changes: HashMap<ObjId, f64>

The spacing factors corresponding to the id of the spacing 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 duplicate of the value. Read more
1.0.0 · Source§

const 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<'de> Deserialize<'de> for Header

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl PartialEq for Header

Source§

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

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

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

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Serialize for Header

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl StructuralPartialEq for Header

Auto Trait Implementations§

§

impl Freeze for Header

§

impl RefUnwindSafe for Header

§

impl Send for Header

§

impl Sync for Header

§

impl Unpin for Header

§

impl UnwindSafe for Header

Blanket Implementations§

Source§

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

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

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

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

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

Source§

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

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

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

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> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

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 T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

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

Performs the conversion.
Source§

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

Source§

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

The type returned in the event of a conversion error.
Source§

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

Performs the conversion.
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,