Struct osu_db::replay::Replay[][src]

pub struct Replay {
Show 20 fields pub mode: Mode, pub version: u32, pub beatmap_hash: Option<String>, pub player_name: Option<String>, pub replay_hash: Option<String>, pub count_300: u16, pub count_100: u16, pub count_50: u16, pub count_geki: u16, pub count_katsu: u16, pub count_miss: u16, pub score: u32, pub max_combo: u16, pub perfect_combo: bool, pub mods: ModSet, pub life_graph: Option<String>, pub timestamp: DateTime<Utc>, pub replay_data: Option<Vec<Action>>, pub raw_replay_data: Option<Vec<u8>>, pub online_score_id: u64,
}
Expand description

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

Amount of 300s (fruits in ctb).

count_100: u16

Amount of 100s (drops in ctb, 150s in taiko and 200s in mania).

count_50: u16

Amount of 50s (droplets in ctb).

count_geki: u16

Amount of gekis (“MAX scores” or “rainbow 300s” in mania).

count_katsu: u16

Amount of katsus (200s in mania, droplet misses in ctb).

count_miss: u16

Amount of misses (fruit + drop misses in ctb).

score: u32

The numerical score achieved.

max_combo: u16perfect_combo: boolmods: 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

Parse a replay from its raw bytes.

Read a replay from a standalone .osr osu! replay file.

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.

Similar to to_writer but writes the replay to an osr file.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.