pub struct Replay {
Show 20 fields pub mode: Mode, pub version: u32, pub beatmap_hash: String, pub player_username: String, pub replay_hash: String, pub count_300: u16, pub count_100: u16, pub count_50: u16, pub count_geki: u16, pub count_katu: u16, pub count_miss: u16, pub score: u32, pub max_combo: u16, pub perfect: bool, pub mods: Mods, pub life_graph: Vec<(i32, f64)>, pub timestamp: u64, pub action_data: Vec<u8>, pub score_id: Option<u64>, pub target_practice_total_accuracy: Option<f64>,
}
Expand description

A replay object.

See the module documentation for examples of using this struct.

Fields

mode: Mode

osu! game mode that this replay was recorded for

Note the mode field may change the meaning of some of the count_* fields becuase some osu! modes score slightly differently from standard

version: u32

osu! game version this replay was recorded on

beatmap_hash: String

MD5 hash for the beatmap this replay’s map

player_username: String

The username of player

replay_hash: String

MD5 hash for this replay

count_300: u16

The number of 300s the player scored in this map

count_100: u16

The number of 100s the player scored, or 150s in taiko

count_50: u16

The number of 50s the player scored, or small fruit in Catch the Beat

count_geki: u16

The number of gekis the player scored in standard, or max 300s in Mania

count_katu: u16

The number of katus the player scored in standard, or 200s in Mania

count_miss: u16

The number of misses

score: u32

total score as displayed on the score report

max_combo: u16

max combo as displayed on the score report

perfect: bool

true if the player has no misses, slider breaks, or early finished sliders.

mods: Mods

mod values mods or’d together

life_graph: Vec<(i32, f64)>

List of integer timestamps with an associated player life value.

0 = No health, 1 = Full health

timestamp: u64

Timestamp of the replay in measured in 1/10ths of a millisecond (100 ns)

This is value is measured in windows ticks It counts the number of ticks from 12:00:00 midnight, January 1, 0001 to the time this replay was created

action_data: Vec<u8>

The action data contained in this replay.

If the feature replay-data is enabled, the function parse_action_data can be used to decompress and parse the data that is contained in this replay.

score_id: Option<u64>

Online ID of this score, if submitted.

target_practice_total_accuracy: Option<f64>

Only present if self.mods includes Target Practice (bit 23) Total accuracy of all hits. Divide this value by the number of targets to find the actual accuracy

Implementations

Parse the replay header from a replay file.

The returned struct will be missing the action, score_id, and target_practice_total_accuracy fields. If you need score_id or target_practice_total_accuracy, but don’t want to parse actions use the parse_skip_actions function instead.

Writes this replay to the given writer

Available on crate feature replay-data only.

Updates the Replay object with action data

Available on crate feature replay-data only.

Parse and retrieve the actions in the replay

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

Deserialize this value from the given Serde deserializer. Read more

Serialize this value into the given Serde serializer. Read more

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

Returns the argument unchanged.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The resulting type after obtaining ownership.

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

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.

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more