Struct riven::models::match_v5::Participant

source ·
pub struct Participant {
Show 144 fields pub assists: i32, pub baron_kills: i32, pub bounty_level: i32, pub champ_experience: i32, pub champ_level: i32, pub champion_id: Result<Champion, TryFromIntError>, pub champion_name: String, pub champion_transform: i32, pub consumables_purchased: i32, pub damage_dealt_to_buildings: Option<i32>, pub damage_dealt_to_objectives: i32, pub damage_dealt_to_turrets: i32, pub damage_self_mitigated: i32, pub deaths: i32, pub detector_wards_placed: i32, pub double_kills: i32, pub dragon_kills: i32, pub first_blood_assist: bool, pub first_blood_kill: bool, pub first_tower_assist: bool, pub first_tower_kill: bool, pub game_ended_in_early_surrender: bool, pub game_ended_in_surrender: bool, pub gold_earned: i32, pub gold_spent: i32, pub individual_position: String, pub inhibitor_kills: i32, pub inhibitor_takedowns: Option<i32>, pub inhibitors_lost: Option<i32>, pub item0: i32, pub item1: i32, pub item2: i32, pub item3: i32, pub item4: i32, pub item5: i32, pub item6: i32, pub items_purchased: i32, pub killing_sprees: i32, pub kills: i32, pub lane: String, pub largest_critical_strike: i32, pub largest_killing_spree: i32, pub largest_multi_kill: i32, pub longest_time_spent_living: i32, pub magic_damage_dealt: i32, pub magic_damage_dealt_to_champions: i32, pub magic_damage_taken: i32, pub neutral_minions_killed: i32, pub nexus_kills: i32, pub nexus_takedowns: Option<i32>, pub nexus_lost: Option<i32>, pub objectives_stolen: i32, pub objectives_stolen_assists: i32, pub participant_id: i32, pub penta_kills: i32, pub perks: Perks, pub physical_damage_dealt: i32, pub physical_damage_dealt_to_champions: i32, pub physical_damage_taken: i32, pub player_augment1: Option<i32>, pub player_augment2: Option<i32>, pub player_augment3: Option<i32>, pub player_augment4: Option<i32>, pub player_subteam_id: Option<i32>, pub profile_icon: i32, pub puuid: String, pub quadra_kills: i32, pub riot_id_name: Option<String>, pub riot_id_tagline: String, pub role: String, pub sight_wards_bought_in_game: i32, pub spell1_casts: i32, pub spell2_casts: i32, pub spell3_casts: i32, pub spell4_casts: i32, pub summoner1_casts: i32, pub summoner1_id: i32, pub summoner2_casts: i32, pub summoner2_id: i32, pub summoner_id: String, pub summoner_level: i32, pub summoner_name: String, pub team_early_surrendered: bool, pub team_id: Team, pub team_position: String, pub time_c_cing_others: i32, pub time_played: i32, pub total_damage_dealt: i32, pub total_damage_dealt_to_champions: i32, pub total_damage_shielded_on_teammates: i32, pub total_damage_taken: i32, pub total_heal: i32, pub total_heals_on_teammates: i32, pub total_minions_killed: i32, pub total_time_cc_dealt: i32, pub total_time_spent_dead: i32, pub total_units_healed: i32, pub triple_kills: i32, pub true_damage_dealt: i32, pub true_damage_dealt_to_champions: i32, pub true_damage_taken: i32, pub turret_kills: i32, pub turret_takedowns: Option<i32>, pub turrets_lost: Option<i32>, pub unreal_kills: i32, pub vision_score: i32, pub vision_wards_bought_in_game: i32, pub wards_killed: i32, pub wards_placed: i32, pub win: bool, pub riot_id_game_name: Option<String>, pub all_in_pings: Option<i32>, pub assist_me_pings: Option<i32>, pub bait_pings: Option<i32>, pub basic_pings: Option<i32>, pub command_pings: Option<i32>, pub danger_pings: Option<i32>, pub enemy_missing_pings: Option<i32>, pub enemy_vision_pings: Option<i32>, pub get_back_pings: Option<i32>, pub hold_pings: Option<i32>, pub need_vision_pings: Option<i32>, pub on_my_way_pings: Option<i32>, pub push_pings: Option<i32>, pub vision_cleared_pings: Option<i32>, pub eligible_for_progression: Option<bool>, pub challenges: Option<ParticipantChallenges>, pub total_ally_jungle_minions_killed: Option<i32>, pub total_enemy_jungle_minions_killed: Option<i32>, pub subteam_placement: Option<i32>, pub placement: Option<i32>, pub missions: Option<ParticipantMissions>, pub player_score0: Option<i32>, pub player_score1: Option<i32>, pub player_score10: Option<i32>, pub player_score11: Option<i32>, pub player_score2: Option<i32>, pub player_score3: Option<i32>, pub player_score4: Option<i32>, pub player_score5: Option<i32>, pub player_score6: Option<i32>, pub player_score7: Option<i32>, pub player_score8: Option<i32>, pub player_score9: Option<i32>,
}
Expand description

Participant data object.

Fields§

§assists: i32§baron_kills: i32§bounty_level: i32§champ_experience: i32§champ_level: i32§champion_id: Result<Champion, TryFromIntError>
👎Deprecated since 2.5.0: Use Participant.champion() instead. Riot sometimes returns corrupted data for this field: https://github.com/RiotGames/developer-relations/issues/553

Prior to patch 11.4, on Feb 18th, 2021, this field returned invalid championIds. We recommend determining the champion based on the championName field for matches played prior to patch 11.4.

Instead use Self::champion() which checks this field then parses Self::champion_name.

§champion_name: String§champion_transform: i32

This field is currently only utilized for Kayn’s transformations. (Legal values: 0 - None, 1 - Slayer, 2 - Assassin)

§consumables_purchased: i32§damage_dealt_to_buildings: Option<i32>§damage_dealt_to_objectives: i32§damage_dealt_to_turrets: i32§damage_self_mitigated: i32§deaths: i32§detector_wards_placed: i32§double_kills: i32§dragon_kills: i32§first_blood_assist: bool§first_blood_kill: bool§first_tower_assist: bool§first_tower_kill: bool§game_ended_in_early_surrender: bool§game_ended_in_surrender: bool§gold_earned: i32§gold_spent: i32§individual_position: String

Both individualPosition and teamPosition are computed by the game server and are different versions of the most likely position played by a player. The individualPosition is the best guess for which position the player actually played in isolation of anything else. The teamPosition is the best guess for which position the player actually played if we add the constraint that each team must have one top player, one jungle, one middle, etc. Generally the recommendation is to use the teamPosition field over the individualPosition field.

§inhibitor_kills: i32§inhibitor_takedowns: Option<i32>§inhibitors_lost: Option<i32>§item0: i32§item1: i32§item2: i32§item3: i32§item4: i32§item5: i32§item6: i32§items_purchased: i32§killing_sprees: i32§kills: i32§lane: String§largest_critical_strike: i32§largest_killing_spree: i32§largest_multi_kill: i32§longest_time_spent_living: i32§magic_damage_dealt: i32§magic_damage_dealt_to_champions: i32§magic_damage_taken: i32§neutral_minions_killed: i32§nexus_kills: i32§nexus_takedowns: Option<i32>§nexus_lost: Option<i32>§objectives_stolen: i32§objectives_stolen_assists: i32§participant_id: i32§penta_kills: i32§perks: Perks§physical_damage_dealt: i32§physical_damage_dealt_to_champions: i32§physical_damage_taken: i32§player_augment1: Option<i32>§player_augment2: Option<i32>§player_augment3: Option<i32>§player_augment4: Option<i32>§player_subteam_id: Option<i32>§profile_icon: i32§puuid: String§quadra_kills: i32§riot_id_name: Option<String>

Replaced by riotIdGameName in games played in patch 14.5 and after.

§riot_id_tagline: String§role: String§sight_wards_bought_in_game: i32§spell1_casts: i32§spell2_casts: i32§spell3_casts: i32§spell4_casts: i32§summoner1_casts: i32§summoner1_id: i32§summoner2_casts: i32§summoner2_id: i32§summoner_id: String§summoner_level: i32§summoner_name: String§team_early_surrendered: bool§team_id: Team§team_position: String

Both individualPosition and teamPosition are computed by the game server and are different versions of the most likely position played by a player. The individualPosition is the best guess for which position the player actually played in isolation of anything else. The teamPosition is the best guess for which position the player actually played if we add the constraint that each team must have one top player, one jungle, one middle, etc. Generally the recommendation is to use the teamPosition field over the individualPosition field.

§time_c_cing_others: i32§time_played: i32§total_damage_dealt: i32§total_damage_dealt_to_champions: i32§total_damage_shielded_on_teammates: i32§total_damage_taken: i32§total_heal: i32§total_heals_on_teammates: i32§total_minions_killed: i32§total_time_cc_dealt: i32§total_time_spent_dead: i32§total_units_healed: i32§triple_kills: i32§true_damage_dealt: i32§true_damage_dealt_to_champions: i32§true_damage_taken: i32§turret_kills: i32§turret_takedowns: Option<i32>§turrets_lost: Option<i32>§unreal_kills: i32§vision_score: i32§vision_wards_bought_in_game: i32§wards_killed: i32§wards_placed: i32§win: bool§riot_id_game_name: Option<String>

Use riotIdName for games before patch 14.5.

§all_in_pings: Option<i32>§assist_me_pings: Option<i32>§bait_pings: Option<i32>§basic_pings: Option<i32>§command_pings: Option<i32>§danger_pings: Option<i32>§enemy_missing_pings: Option<i32>§enemy_vision_pings: Option<i32>§get_back_pings: Option<i32>§hold_pings: Option<i32>§need_vision_pings: Option<i32>§on_my_way_pings: Option<i32>§push_pings: Option<i32>§vision_cleared_pings: Option<i32>§eligible_for_progression: Option<bool>§challenges: Option<ParticipantChallenges>§total_ally_jungle_minions_killed: Option<i32>§total_enemy_jungle_minions_killed: Option<i32>§subteam_placement: Option<i32>§placement: Option<i32>§missions: Option<ParticipantMissions>§player_score0: Option<i32>§player_score1: Option<i32>§player_score10: Option<i32>§player_score11: Option<i32>§player_score2: Option<i32>§player_score3: Option<i32>§player_score4: Option<i32>§player_score5: Option<i32>§player_score6: Option<i32>§player_score7: Option<i32>§player_score8: Option<i32>§player_score9: Option<i32>

Implementations§

source§

impl Participant

source

pub fn champion(&self) -> Result<Champion, <Champion as FromStr>::Err>

This method takes the Self::champion_id field if it is valid (Ok), otherwise it attempts to parse Self::champion_name and returns the Result.

This is needed because some of Riot’s Self::champion_id data is corrupted, as they describe in the docs:

Prior to patch 11.4, on Feb 18th, 2021, this field returned invalid championIds. We recommend determining the champion based on the championName field for matches played prior to patch 11.4.

This issue is reported here: https://github.com/RiotGames/developer-relations/issues/553.

source

pub fn riot_id_game_name(&self) -> Option<&str>

This method returns the name portion of the riot ID for this summoner.

Prior to patch 14.5, this was in the Self::riot_id_name field. After, this moved to the Self.riot_id_game_name field.

This method simply returns whichever of the two fields is not None.

Trait Implementations§

source§

impl Clone for Participant

source§

fn clone(&self) -> Participant

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for Participant

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<'de> Deserialize<'de> for Participant

source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
source§

impl Serialize for Participant

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T> Instrument for T

source§

fn instrument(self, span: Span) -> Instrumented<Self>

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

fn in_current_span(self) -> Instrumented<Self>

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

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

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

source§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

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

fn clone_into(&self, target: &mut T)

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

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
source§

impl<T> WithSubscriber for T

source§

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
source§

fn with_current_subscriber(self) -> WithDispatch<Self>

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

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,