pub struct General {Show 21 fields
pub audio_filename: Option<AudioFilename>,
pub audio_lead_in: Option<AudioLeadIn>,
pub audio_hash: Option<AudioHash>,
pub preview_time: Option<PreviewTime>,
pub countdown: Option<Countdown>,
pub sample_set: Option<SampleSet>,
pub stack_leniency: Option<StackLeniency>,
pub mode: Option<Mode>,
pub letterbox_in_breaks: Option<LetterboxInBreaks>,
pub story_fire_in_front: Option<StoryFireInFront>,
pub use_skin_sprites: Option<UseSkinSprites>,
pub always_show_playfield: Option<AlwaysShowPlayfield>,
pub overlay_position: Option<OverlayPosition>,
pub skin_preference: Option<SkinPreference>,
pub epilepsy_warning: Option<EpilepsyWarning>,
pub countdown_offset: Option<CountdownOffset>,
pub special_style: Option<SpecialStyle>,
pub widescreen_storyboard: Option<WidescreenStoryboard>,
pub samples_match_playback_rate: Option<SamplesMatchPlaybackRate>,
pub editor_bookmarks: Option<EditorBookmarks>,
pub editor_distance_spacing: Option<EditorDistanceSpacing>,
}Expand description
A struct representing the general section of an osu file.
Fields§
§audio_filename: Option<AudioFilename>The name of the beatmap.
audio_lead_in: Option<AudioLeadIn>Milliseconds of silence before the audio starts playing.
audio_hash: Option<AudioHash>Deprecated.
preview_time: Option<PreviewTime>Time in milliseconds when the audio preview should start.
- Defaults to
-1.
countdown: Option<Countdown>Speed of the countdown before the first hit object.
- Defaults to
Normal.
sample_set: Option<SampleSet>Sample set that will be used if timing points do not override it.
- Defaults to
Normal.
stack_leniency: Option<StackLeniency>Multiplier for the threshold in time where hit objects placed close together stack.
- Defaults to
0.7.
mode: Option<Mode>Game mode.
- Defaults to
osu.
letterbox_in_breaks: Option<LetterboxInBreaks>Whether or not breaks have a letterboxing effect.
- Defaults to
false.
story_fire_in_front: Option<StoryFireInFront>Deprecated.
- Defaults to
true.
use_skin_sprites: Option<UseSkinSprites>Whether or not the storyboard can use the user’s skin images.
- Defaults to
false.
always_show_playfield: Option<AlwaysShowPlayfield>Deprecated.
- Defaults to
false.
overlay_position: Option<OverlayPosition>Draw order of hit circle overlays compared to hit numbers.
- Defaults to
NoChange.
skin_preference: Option<SkinPreference>Preferred skin to use during gameplay.
epilepsy_warning: Option<EpilepsyWarning>Whether or not a warning about flashing colours should be shown at the beginning of the map.
- Defaults to
false.
countdown_offset: Option<CountdownOffset>Time in beats that the countdown starts before the first hit object.
- Defaults to
0.
special_style: Option<SpecialStyle>Whether or not the “N+1” style key layout is used for osu!mania.
- Defaults to
false.
widescreen_storyboard: Option<WidescreenStoryboard>Whether or not the storyboard allows widescreen viewing.
- Defaults to
false.
samples_match_playback_rate: Option<SamplesMatchPlaybackRate>Whether or not sound samples will change rate when playing with speed-changing mods.
- Defaults to
false.
editor_bookmarks: Option<EditorBookmarks>Deprecated.
editor_distance_spacing: Option<EditorDistanceSpacing>Deprecated.
Implementations§
Trait Implementations§
impl Eq for General
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
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 moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
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 moreSource§impl<T> Paint for Twhere
T: ?Sized,
impl<T> Paint for Twhere
T: ?Sized,
Source§fn fg(&self, value: Color) -> Painted<&T>
fn fg(&self, value: Color) -> Painted<&T>
Returns a styled value derived from self with the foreground set to
value.
This method should be used rarely. Instead, prefer to use color-specific
builder methods like red() and
green(), which have the same functionality but are
pithier.
§Example
Set foreground color to white using fg():
use yansi::{Paint, Color};
painted.fg(Color::White);Set foreground color to white using white().
use yansi::Paint;
painted.white();Source§fn bright_black(&self) -> Painted<&T>
fn bright_black(&self) -> Painted<&T>
Source§fn bright_red(&self) -> Painted<&T>
fn bright_red(&self) -> Painted<&T>
Source§fn bright_green(&self) -> Painted<&T>
fn bright_green(&self) -> Painted<&T>
Source§fn bright_yellow(&self) -> Painted<&T>
fn bright_yellow(&self) -> Painted<&T>
Source§fn bright_blue(&self) -> Painted<&T>
fn bright_blue(&self) -> Painted<&T>
Source§fn bright_magenta(&self) -> Painted<&T>
fn bright_magenta(&self) -> Painted<&T>
Source§fn bright_cyan(&self) -> Painted<&T>
fn bright_cyan(&self) -> Painted<&T>
Source§fn bright_white(&self) -> Painted<&T>
fn bright_white(&self) -> Painted<&T>
Source§fn bg(&self, value: Color) -> Painted<&T>
fn bg(&self, value: Color) -> Painted<&T>
Returns a styled value derived from self with the background set to
value.
This method should be used rarely. Instead, prefer to use color-specific
builder methods like on_red() and
on_green(), which have the same functionality but
are pithier.
§Example
Set background color to red using fg():
use yansi::{Paint, Color};
painted.bg(Color::Red);Set background color to red using on_red().
use yansi::Paint;
painted.on_red();Source§fn on_primary(&self) -> Painted<&T>
fn on_primary(&self) -> Painted<&T>
Source§fn on_magenta(&self) -> Painted<&T>
fn on_magenta(&self) -> Painted<&T>
Source§fn on_bright_black(&self) -> Painted<&T>
fn on_bright_black(&self) -> Painted<&T>
Source§fn on_bright_red(&self) -> Painted<&T>
fn on_bright_red(&self) -> Painted<&T>
Source§fn on_bright_green(&self) -> Painted<&T>
fn on_bright_green(&self) -> Painted<&T>
Source§fn on_bright_yellow(&self) -> Painted<&T>
fn on_bright_yellow(&self) -> Painted<&T>
Source§fn on_bright_blue(&self) -> Painted<&T>
fn on_bright_blue(&self) -> Painted<&T>
Source§fn on_bright_magenta(&self) -> Painted<&T>
fn on_bright_magenta(&self) -> Painted<&T>
Source§fn on_bright_cyan(&self) -> Painted<&T>
fn on_bright_cyan(&self) -> Painted<&T>
Source§fn on_bright_white(&self) -> Painted<&T>
fn on_bright_white(&self) -> Painted<&T>
Source§fn attr(&self, value: Attribute) -> Painted<&T>
fn attr(&self, value: Attribute) -> Painted<&T>
Enables the styling Attribute value.
This method should be used rarely. Instead, prefer to use
attribute-specific builder methods like bold() and
underline(), which have the same functionality
but are pithier.
§Example
Make text bold using attr():
use yansi::{Paint, Attribute};
painted.attr(Attribute::Bold);Make text bold using using bold().
use yansi::Paint;
painted.bold();Source§fn rapid_blink(&self) -> Painted<&T>
fn rapid_blink(&self) -> Painted<&T>
Source§fn quirk(&self, value: Quirk) -> Painted<&T>
fn quirk(&self, value: Quirk) -> Painted<&T>
Enables the yansi Quirk value.
This method should be used rarely. Instead, prefer to use quirk-specific
builder methods like mask() and
wrap(), which have the same functionality but are
pithier.
§Example
Enable wrapping using .quirk():
use yansi::{Paint, Quirk};
painted.quirk(Quirk::Wrap);Enable wrapping using wrap().
use yansi::Paint;
painted.wrap();Source§fn clear(&self) -> Painted<&T>
👎Deprecated since 1.0.1: renamed to resetting() due to conflicts with Vec::clear().
The clear() method will be removed in a future release.
fn clear(&self) -> Painted<&T>
resetting() due to conflicts with Vec::clear().
The clear() method will be removed in a future release.Source§fn whenever(&self, value: Condition) -> Painted<&T>
fn whenever(&self, value: Condition) -> Painted<&T>
Conditionally enable styling based on whether the Condition value
applies. Replaces any previous condition.
See the crate level docs for more details.
§Example
Enable styling painted only when both stdout and stderr are TTYs:
use yansi::{Paint, Condition};
painted.red().on_yellow().whenever(Condition::STDOUTERR_ARE_TTY);