PlayerIdentity

Trait PlayerIdentity 

Source
pub trait PlayerIdentity {
    // Required methods
    fn player_id(&self) -> i64;
    fn username(&self) -> &str;
    fn avatar_url(&self) -> &str;
}
Expand description

Core player identity - the immutable parts that identify a player.

This is embedded in all player-related structs to avoid field duplication. Contains the fields that are constant for a player’s session.

Required Methods§

Source

fn player_id(&self) -> i64

Get player ID.

Source

fn username(&self) -> &str

Get username.

Source

fn avatar_url(&self) -> &str

Get avatar URL.

Implementors§