pub struct General {Show 14 fields
pub audio_file: String,
pub audio_lead_in: f64,
pub preview_time: i32,
pub default_sample_bank: SampleBank,
pub default_sample_volume: i32,
pub stack_leniency: f32,
pub mode: GameMode,
pub letterbox_in_breaks: bool,
pub special_style: bool,
pub widescreen_storyboard: bool,
pub epilepsy_warning: bool,
pub samples_match_playback_rate: bool,
pub countdown: CountdownType,
pub countdown_offset: i32,
}Expand description
Struct containing all data from a .osu file’s [General] section.
Fields§
§audio_file: String§audio_lead_in: f64§preview_time: i32§default_sample_bank: SampleBank§default_sample_volume: i32§stack_leniency: f32§mode: GameMode§letterbox_in_breaks: bool§special_style: bool§widescreen_storyboard: bool§epilepsy_warning: bool§samples_match_playback_rate: bool§countdown: CountdownType§countdown_offset: i32Trait Implementations§
Source§impl DecodeBeatmap for General
impl DecodeBeatmap for General
Source§type Error = ParseGeneralError
type Error = ParseGeneralError
Error type in case something goes wrong while parsing. Read more
Source§type State = General
type State = General
The parsing state which will be updated on each line and turned into
Self at the end.Source§fn parse_general(state: &mut Self::State, line: &str) -> Result<(), Self::Error>
fn parse_general(state: &mut Self::State, line: &str) -> Result<(), Self::Error>
Update the state based on a line of the
[General] section.Source§fn parse_editor(_: &mut Self::State, _: &str) -> Result<(), Self::Error>
fn parse_editor(_: &mut Self::State, _: &str) -> Result<(), Self::Error>
Update the state based on a line of the
[Editor] section.Source§fn parse_metadata(_: &mut Self::State, _: &str) -> Result<(), Self::Error>
fn parse_metadata(_: &mut Self::State, _: &str) -> Result<(), Self::Error>
Update the state based on a line of the
[Metadata] section.Source§fn parse_difficulty(_: &mut Self::State, _: &str) -> Result<(), Self::Error>
fn parse_difficulty(_: &mut Self::State, _: &str) -> Result<(), Self::Error>
Update the state based on a line of the
[Difficulty] section.Source§fn parse_events(_: &mut Self::State, _: &str) -> Result<(), Self::Error>
fn parse_events(_: &mut Self::State, _: &str) -> Result<(), Self::Error>
Update the state based on a line of the
[Events] section.Source§fn parse_timing_points(_: &mut Self::State, _: &str) -> Result<(), Self::Error>
fn parse_timing_points(_: &mut Self::State, _: &str) -> Result<(), Self::Error>
Update the state based on a line of the
[TimingPoints] section.Source§fn parse_colors(_: &mut Self::State, _: &str) -> Result<(), Self::Error>
fn parse_colors(_: &mut Self::State, _: &str) -> Result<(), Self::Error>
Update the state based on a line of the
[Colours] section.Source§fn parse_hit_objects(_: &mut Self::State, _: &str) -> Result<(), Self::Error>
fn parse_hit_objects(_: &mut Self::State, _: &str) -> Result<(), Self::Error>
Update the state based on a line of the
[HitObjects] section.Source§fn parse_variables(_: &mut Self::State, _: &str) -> Result<(), Self::Error>
fn parse_variables(_: &mut Self::State, _: &str) -> Result<(), Self::Error>
Update the state based on a line of the
[Variables] section.Source§fn parse_catch_the_beat(_: &mut Self::State, _: &str) -> Result<(), Self::Error>
fn parse_catch_the_beat(_: &mut Self::State, _: &str) -> Result<(), Self::Error>
Update the state based on a line of the
[CatchTheBeat] section.Source§fn parse_mania(_: &mut Self::State, _: &str) -> Result<(), Self::Error>
fn parse_mania(_: &mut Self::State, _: &str) -> Result<(), Self::Error>
Update the state based on a line of the
[Mania] section.Source§fn should_skip_line(line: &str) -> bool
fn should_skip_line(line: &str) -> bool
Whether a line should not be forwarded to the parsing methods.
impl StructuralPartialEq for General
Auto Trait Implementations§
impl Freeze for General
impl RefUnwindSafe for General
impl Send for General
impl Sync for General
impl Unpin for General
impl UnwindSafe for General
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more