[][src]Enum weasel::entity::EntityId

pub enum EntityId<R: BattleRules> {
    Creature(CreatureId<R>),
}

Id to uniquely identify an entity. EntityId is used as global id to identify entities in the game world regardless of their type.

Variants

Creature(CreatureId<R>)

Standard creature.

Methods

impl<R: BattleRules> EntityId<R>[src]

pub fn creature(&self) -> WeaselResult<CreatureId<R>, R>[src]

Extracts a creature id out of this entity id.

Returns an error if the entity id's type is not creature.

Trait Implementations

impl<R: BattleRules> Clone for EntityId<R>[src]

impl<R: BattleRules> Debug for EntityId<R>[src]

impl<'de, R: BattleRules> Deserialize<'de> for EntityId<R> where
    CreatureId<R>: Deserialize<'de>, 
[src]

impl<R: BattleRules> Display for EntityId<R> where
    CreatureId<R>: Display
[src]

impl<R: BattleRules> PartialEq<EntityId<R>> for EntityId<R>[src]

impl<R: BattleRules> Serialize for EntityId<R> where
    CreatureId<R>: Serialize
[src]

Auto Trait Implementations

impl<R> RefUnwindSafe for EntityId<R> where
    <<R as BattleRules>::CR as CharacterRules<R>>::CreatureId: RefUnwindSafe

impl<R> Send for EntityId<R> where
    <<R as BattleRules>::CR as CharacterRules<R>>::CreatureId: Send

impl<R> Sync for EntityId<R> where
    <<R as BattleRules>::CR as CharacterRules<R>>::CreatureId: Sync

impl<R> Unpin for EntityId<R> where
    <<R as BattleRules>::CR as CharacterRules<R>>::CreatureId: Unpin

impl<R> UnwindSafe for EntityId<R> where
    <<R as BattleRules>::CR as CharacterRules<R>>::CreatureId: UnwindSafe

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> DeserializeOwned for T where
    T: Deserialize<'de>, 
[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> ToString for T where
    T: Display + ?Sized
[src]

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.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,