[−][src]Struct osu_db::replay::Replay
An osu! replay.
The replay might come from a large ScoreList
score database, or from an individual standalone
.osr
file.
Fields
mode: Mode
The gamemode the replay was scored in.
version: u32
The .db
version of the replay file.
If the replay is inside a scores.db
file, the version should be redundant with it (?).
beatmap_hash: Option<String>
The MD5 hash of the beatmap played.
player_name: Option<String>
The name of the player who scored the replay.
replay_hash: Option<String>
The replay-specific MD5 hash.
count_300: u16
The same in all modes: amount of 300 scores.
count_100: u16
Amount of 100 scores in std and ctb, but 150 in taiko and 200 in mania.
count_50: u16
Amount of 50 scores in std and mania, but small fruit in ctb.
count_geki: u16
Amount of gekis in std, but MAX scores (rainbow 300s) in mania.
count_katsu: u16
Amount of katsus in std, but 100 scores in mania.
count_miss: u16
Amount of misses in all modes.
score: u32
The numerical score achieved.
max_combo: u16
perfect_combo: bool
mods: ModSet
The mod combination with which the replay was done.
life_graph: Option<String>
A string representing a graph of how much life bar did the player have along the beatmap.
It is a comma-separated list of human-readable entries in the form <offset>|<life>
, where
<offset>
is the amount of milliseconds since the start of the song and <life>
is a
number between 0 and 1 representing the amount of life left.
timestamp: DateTime<Utc>
When was the replay scored.
replay_data: Option<Vec<Action>>
Decompressed replay data.
Only available on standalone .osr
replays, and if the compression
feature is enabled
(enabled by default).
When writing .osr
files (and .osr
files only), if the compression
feature is enabled
and this field is Some
, these actions will be compressed and written. Otherwise,
raw_replay_data
will be written instead.
raw_replay_data: Option<Vec<u8>>
Raw replay data, available on .osr
files even if the compression
feature is not enabled.
When writing, this field is used as a fallback if replay_data
is None
or the
compression
feature is disabled.
online_score_id: u64
Online score id.
Only has a useful value on replays embedded in a ScoreList
.
Implementations
impl Replay
[src]
pub fn from_bytes(bytes: &[u8]) -> Result<Replay, Error>
[src]
Parse a replay from its raw bytes.
pub fn from_file<P: AsRef<Path>>(path: P) -> Result<Replay, Error>
[src]
Read a replay from a standalone .osr
osu! replay file.
pub fn to_writer<W: Write>(
&self,
out: W,
compression_level: Option<u32>
) -> Result<()>
[src]
&self,
out: W,
compression_level: Option<u32>
) -> Result<()>
Write the replay to an arbitrary writer, with the given compression level.
If the compression level is None
the arbitrary default
replay::DEFAULT_COMPRESSION_LEVEL
will be used.
If the compression
feature is disabled this argument has no effect.
pub fn save<P: AsRef<Path>>(
&self,
path: P,
compression_level: Option<u32>
) -> Result<()>
[src]
&self,
path: P,
compression_level: Option<u32>
) -> Result<()>
Similar to to_writer
but writes the replay to an osr
file.
Trait Implementations
impl Clone for Replay
[src]
impl Debug for Replay
[src]
impl PartialEq<Replay> for Replay
[src]
impl StructuralPartialEq for Replay
[src]
Auto Trait Implementations
impl RefUnwindSafe for Replay
impl Send for Replay
impl Sync for Replay
impl Unpin for Replay
impl UnwindSafe for Replay
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,