pub struct Beatmap {Show 30 fields
pub version: u32,
pub audio_filename: String,
pub audio_leadin: Millis,
pub preview_time: Millis,
pub countdown: bool,
pub sample_set: SampleSet,
pub stack_leniency: f64,
pub mode: Mode,
pub letterbox_in_breaks: bool,
pub widescreen_storyboard: bool,
pub difficulty: Difficulty,
pub bookmarks: Vec<i32>,
pub distance_spacing: f64,
pub beat_divisor: u8,
pub grid_size: GridSize,
pub timeline_zoom: f64,
pub title: String,
pub title_unicode: String,
pub artist: String,
pub artist_unicode: String,
pub creator: String,
pub difficulty_name: String,
pub source: String,
pub tags: Vec<String>,
pub beatmap_id: i32,
pub beatmap_set_id: i32,
pub events: Vec<Event>,
pub colors: Vec<Color>,
pub hit_objects: Vec<HitObject>,
pub timing_points: Vec<TimingPoint>,
}
Expand description
Represents a single beatmap.
Fields
version: u32
The osu! file format being used
audio_filename: String
The name of the audio file to use, relative to the beatmap file.
audio_leadin: Millis
The amount of time (in milliseconds) added before the audio file begins playing. Useful for audio files that begin immediately.
preview_time: Millis
When (in milliseconds) the audio file should begin playing when selected in the song selection menu.
countdown: bool
Whether or not to show the countdown
sample_set: SampleSet
The default sample set for hit objects which don’t have a custom override.
stack_leniency: f64
Leniency for stacked objects.
mode: Mode
The game mode (standard, taiko, catch the beat, mania).
letterbox_in_breaks: bool
Whether or not to show black borders during breaks.
widescreen_storyboard: bool
TODO: unknown field
difficulty: Difficulty
An instance of the difficulty settings.
bookmarks: Vec<i32>
Bookmarks in the editor
distance_spacing: f64
The last setting used for distance spacing.
beat_divisor: u8
The last setting used for beat divisor
grid_size: GridSize
The last setting used for grid size
timeline_zoom: f64
The last setting used for timeline zoom
title: String
The title of the song (ASCII only).
title_unicode: String
The title of the song (UTF-8).
artist: String
The artist of the song (ASCII only).
artist_unicode: String
The artist of the song (UTF-8).
creator: String
The creator of the mapset.
difficulty_name: String
The name of the difficulty.
source: String
Optional source.
Optional tags.
beatmap_id: i32
The beatmap ID on Bancho.
beatmap_set_id: i32
The beatmap set ID on Bancho.
events: Vec<Event>
Events
colors: Vec<Color>
Overridden combo colors.
hit_objects: Vec<HitObject>
The set of hit objects.
timing_points: Vec<TimingPoint>
The set of timing points.
Implementations
sourceimpl Beatmap
impl Beatmap
sourcepub fn double_iter(&self) -> DoubleIter<'_>ⓘNotable traits for DoubleIter<'a>impl<'a> Iterator for DoubleIter<'a> type Item = (&'a HitObject, &'a TimingPoint);
pub fn double_iter(&self) -> DoubleIter<'_>ⓘNotable traits for DoubleIter<'a>impl<'a> Iterator for DoubleIter<'a> type Item = (&'a HitObject, &'a TimingPoint);
Iterate over both hit objects and timing points. See DoubleIter
for more info.
sourcepub fn get_hitobject_end_time(&self, ho: &HitObject) -> Option<f64>
pub fn get_hitobject_end_time(&self, ho: &HitObject) -> Option<f64>
Computes the end time of the given hitobject
sourcepub fn get_slider_duration(&self, ho: &HitObject) -> Option<f64>
pub fn get_slider_duration(&self, ho: &HitObject) -> Option<f64>
Returns the slider duration in seconds (including repeats!) for a given slider
sourcepub fn get_slider_velocity_at_time(&self, time: Millis) -> f64
pub fn get_slider_velocity_at_time(&self, time: Millis) -> f64
Returns the slider velocity at the given time
sourcepub fn get_bpm_at_time(&self, time: Millis) -> Option<f64>
pub fn get_bpm_at_time(&self, time: Millis) -> Option<f64>
Returns the BPM at the given time
sourceimpl Beatmap
impl Beatmap
sourcepub fn locate_timing_point(&self, time: impl Into<Millis>) -> Option<TimingPoint>
pub fn locate_timing_point(&self, time: impl Into<Millis>) -> Option<TimingPoint>
Returns the timing point associated with the timing section to which the given time belongs.
Trait Implementations
sourceimpl<'de> Deserialize<'de> for Beatmap
impl<'de> Deserialize<'de> for Beatmap
sourcefn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl StructuralPartialEq for Beatmap
Auto Trait Implementations
impl RefUnwindSafe for Beatmap
impl Send for Beatmap
impl Sync for Beatmap
impl Unpin for Beatmap
impl UnwindSafe for Beatmap
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more