Struct Player

Source
pub struct Player {
Show 14 fields pub player_id: i64, pub player_name: String, pub faction_type: Factions, pub is_commander: bool, pub unit_kill: [i32; 3], pub total_unit_kills: i32, pub structure_kill: [i32; 3], pub total_structure_kills: i32, pub death: i32, pub points: i32, pub winner: bool, pub last_entered_time: NaiveDateTime, pub last_left_time: NaiveDateTime, pub duration_played: TimeDelta, /* private fields */
}

Fields§

§player_id: i64§player_name: String§faction_type: Factions§is_commander: bool§unit_kill: [i32; 3]§total_unit_kills: i32§structure_kill: [i32; 3]§total_structure_kills: i32§death: i32§points: i32§winner: bool§last_entered_time: NaiveDateTime§last_left_time: NaiveDateTime§duration_played: TimeDelta

Implementations§

Source§

impl Player

Source

pub fn set_commander(&mut self)

Source

pub fn is_fps(&self) -> bool

Source

pub fn did_win(&self, winning_team: Factions) -> bool

Trait Implementations§

Source§

impl Debug for Player

Source§

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

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl Freeze for Player

§

impl RefUnwindSafe for Player

§

impl Send for Player

§

impl Sync for Player

§

impl Unpin for Player

§

impl UnwindSafe for Player

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, 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, U> TryFrom<U> for T
where U: Into<T>,

Source§

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>,

Source§

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.