pub struct Player { /* private fields */ }
Expand description
Player-specific agent data.
Player agents are characters controlled by a player and as such, they contain data about the account and character used (name, profession), as well as the squad composition.
Note that a Player
is only the player character itself. Any additional entities that are
spawned by the player (clones, illusions, banners, …) are either a Character
or a Gadget
.
Implementations
sourceimpl Player
impl Player
sourcepub fn profession(&self) -> Profession
pub fn profession(&self) -> Profession
The player’s profession.
sourceimpl Player
impl Player
sourcepub fn character_name(&self) -> &str
pub fn character_name(&self) -> &str
The player’s character name.
Note: Hostile WvW agents will have a randomly generated player name.
sourcepub fn account_name(&self) -> &str
pub fn account_name(&self) -> &str
The player’s account name.
This includes the leading colon and the 4-digit denominator.
Note: Hostile WvW agents will have an empty account name.
Trait Implementations
impl Eq for Player
impl StructuralEq for Player
impl StructuralPartialEq for Player
Auto Trait Implementations
impl RefUnwindSafe for Player
impl Send for Player
impl Sync for Player
impl Unpin for Player
impl UnwindSafe for Player
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more