[][src]Struct akashi::Player

pub struct Player { /* fields omitted */ }

Represents a player / user.

Strictly speaking, this is just a minimal Entity object.

Methods

impl Player[src]

pub fn new(
    id: Snowflake,
    component_manager: Arc<ComponentManager<Player>>,
    components_attached: HashSet<TypeId>
) -> Player
[src]

Create a new Player instance.

pub fn empty(
    snowflake_gen: &mut SnowflakeGenerator,
    component_manager: Arc<ComponentManager<Player>>
) -> Player
[src]

Create an 'empty' Player instance with no attached Components and a randomly-generated ID.

pub fn id(&self) -> Snowflake[src]

Get this Player's unique ID.

pub fn component_manager(&self) -> &ComponentManager<Player>[src]

Get a reference to this Player's associated ComponentManager.

Trait Implementations

impl Clone for Player[src]

impl Component<Player> for Inventory[src]

impl Component<Player> for Vec<Snowflake>[src]

impl Component<Player> for Resource[src]

impl Debug for Player[src]

impl Entity for Player[src]

impl PartialEq<Player> for Player[src]

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

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Downcast for T where
    T: Any
[src]

impl<T> DowncastSync for T where
    T: Send + Sync + Any
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.