[−][src]Struct weasel::entity::Entities
Data structure to manage ownership of teams and entities.
Methods
impl<R: BattleRules> Entities<R>
[src]
pub fn creatures(&self) -> impl Iterator<Item = &Creature<R>>
[src]
Returns an iterator over creatures.
pub fn creatures_mut(&mut self) -> impl Iterator<Item = &mut Creature<R>>
[src]
Returns a mutable iterator over creatures.
pub fn creature(&self, id: &CreatureId<R>) -> Option<&Creature<R>>
[src]
Returns the creature with the given id.
pub fn creature_mut(&mut self, id: &CreatureId<R>) -> Option<&mut Creature<R>>
[src]
Returns a mutable reference to the creature with the given id.
pub fn objects(&self) -> impl Iterator<Item = &Object<R>>
[src]
Returns an iterator over objects.
pub fn objects_mut(&mut self) -> impl Iterator<Item = &mut Object<R>>
[src]
Returns a mutable iterator over objects.
pub fn object(&self, id: &ObjectId<R>) -> Option<&Object<R>>
[src]
Returns the object with the given id.
pub fn object_mut(&mut self, id: &ObjectId<R>) -> Option<&mut Object<R>>
[src]
Returns a mutable reference to the object with the given id.
pub fn teams(&self) -> impl Iterator<Item = &Team<R>>
[src]
Returns an iterator over teams.
pub fn teams_mut(&mut self) -> impl Iterator<Item = &mut Team<R>>
[src]
Returns a mutable iterator over teams.
pub fn team(&self, id: &TeamId<R>) -> Option<&Team<R>>
[src]
Returns the team with the given id.
pub fn team_mut(&mut self, id: &TeamId<R>) -> Option<&mut Team<R>>
[src]
Returns a mutable reference to the team with the given id.
pub fn entities(&self) -> impl Iterator<Item = &dyn Entity<R>>
[src]
Returns an iterator over entities.
pub fn entities_mut(&mut self) -> impl Iterator<Item = &mut dyn Entity<R>>
[src]
Returns a mutable iterator over entities.
pub fn entity(&self, id: &EntityId<R>) -> Option<&dyn Entity<R>>
[src]
Returns the entity with the given id.
pub fn entity_mut(&mut self, id: &EntityId<R>) -> Option<&mut dyn Entity<R>>
[src]
Returns a mutable reference to the entity with the given id.
pub fn characters(&self) -> impl Iterator<Item = &dyn Character<R>>
[src]
Returns an iterator over characters.
pub fn characters_mut(&mut self) -> impl Iterator<Item = &mut dyn Character<R>>
[src]
Returns a mutable iterator over characters.
pub fn character(&self, id: &EntityId<R>) -> Option<&dyn Character<R>>
[src]
Returns the character with the given id.
pub fn character_mut(
&mut self,
id: &EntityId<R>
) -> Option<&mut dyn Character<R>>
[src]
&mut self,
id: &EntityId<R>
) -> Option<&mut dyn Character<R>>
Returns a mutable reference to the character with the given id.
pub fn actors(&self) -> impl Iterator<Item = &dyn Actor<R>>
[src]
Returns an iterator over actors.
pub fn actors_mut(&mut self) -> impl Iterator<Item = &mut dyn Actor<R>>
[src]
Returns a mutable iterator over actors.
pub fn actor(&self, id: &EntityId<R>) -> Option<&dyn Actor<R>>
[src]
Returns the character with the given id.
pub fn actor_mut(&mut self, id: &EntityId<R>) -> Option<&mut dyn Actor<R>>
[src]
Returns a mutable reference to the actor with the given id.
pub fn relation(
&self,
first: &TeamId<R>,
second: &TeamId<R>
) -> Option<Relation>
[src]
&self,
first: &TeamId<R>,
second: &TeamId<R>
) -> Option<Relation>
Returns the Relation
between two teams. Relations are symmetric.
The relation of a team towards itself is Kin
.
pub fn allies_id<'a>(
&'a self,
id: &'a TeamId<R>
) -> impl Iterator<Item = TeamId<R>> + 'a
[src]
&'a self,
id: &'a TeamId<R>
) -> impl Iterator<Item = TeamId<R>> + 'a
Returns all allied teams' id of a team.
pub fn allies<'a>(
&'a self,
id: &'a TeamId<R>
) -> impl Iterator<Item = &Team<R>> + 'a
[src]
&'a self,
id: &'a TeamId<R>
) -> impl Iterator<Item = &Team<R>> + 'a
Returns all allied teams of a team.
pub fn enemies_id<'a>(
&'a self,
id: &'a TeamId<R>
) -> impl Iterator<Item = TeamId<R>> + 'a
[src]
&'a self,
id: &'a TeamId<R>
) -> impl Iterator<Item = TeamId<R>> + 'a
Returns all enemy teams' id of a team.
pub fn enemies<'a>(
&'a self,
id: &'a TeamId<R>
) -> impl Iterator<Item = &Team<R>> + 'a
[src]
&'a self,
id: &'a TeamId<R>
) -> impl Iterator<Item = &Team<R>> + 'a
Returns all enemy teams of a team.
pub fn victorious(&self) -> impl Iterator<Item = &Team<R>>
[src]
Returns all victorious teams.
pub fn victorious_id(&self) -> impl Iterator<Item = TeamId<R>> + '_
[src]
Returns the id of all victorious teams.
pub fn defeated(&self) -> impl Iterator<Item = &Team<R>>
[src]
Returns all defeated teams.
pub fn defeated_id(&self) -> impl Iterator<Item = TeamId<R>> + '_
[src]
Returns the id of all defeated teams.
Auto Trait Implementations
impl<R> RefUnwindSafe for Entities<R> where
<R as BattleRules>::AR: ActorRules<R>,
<<R as BattleRules>::AR as ActorRules<R>>::Ability: Id + RefUnwindSafe,
<R as BattleRules>::CR: CharacterRules<R>,
<<R as BattleRules>::CR as CharacterRules<R>>::CreatureId: RefUnwindSafe,
<<<R as BattleRules>::AR as ActorRules<R>>::Ability as Id>::Id: RefUnwindSafe,
<<<R as BattleRules>::CR as CharacterRules<R>>::Statistic as Id>::Id: RefUnwindSafe,
<<<R as BattleRules>::CR as CharacterRules<R>>::Status as Id>::Id: RefUnwindSafe,
<<R as BattleRules>::TR as TeamRules<R>>::Id: RefUnwindSafe,
<<R as BattleRules>::CR as CharacterRules<R>>::ObjectId: RefUnwindSafe,
<<R as BattleRules>::TR as TeamRules<R>>::Objectives: RefUnwindSafe,
<<R as BattleRules>::SR as SpaceRules<R>>::Position: RefUnwindSafe,
<<R as BattleRules>::CR as CharacterRules<R>>::Statistic: Id + RefUnwindSafe,
<<R as BattleRules>::CR as CharacterRules<R>>::Status: Id + RefUnwindSafe,
<R as BattleRules>::TR: TeamRules<R>,
<R as BattleRules>::AR: ActorRules<R>,
<<R as BattleRules>::AR as ActorRules<R>>::Ability: Id + RefUnwindSafe,
<R as BattleRules>::CR: CharacterRules<R>,
<<R as BattleRules>::CR as CharacterRules<R>>::CreatureId: RefUnwindSafe,
<<<R as BattleRules>::AR as ActorRules<R>>::Ability as Id>::Id: RefUnwindSafe,
<<<R as BattleRules>::CR as CharacterRules<R>>::Statistic as Id>::Id: RefUnwindSafe,
<<<R as BattleRules>::CR as CharacterRules<R>>::Status as Id>::Id: RefUnwindSafe,
<<R as BattleRules>::TR as TeamRules<R>>::Id: RefUnwindSafe,
<<R as BattleRules>::CR as CharacterRules<R>>::ObjectId: RefUnwindSafe,
<<R as BattleRules>::TR as TeamRules<R>>::Objectives: RefUnwindSafe,
<<R as BattleRules>::SR as SpaceRules<R>>::Position: RefUnwindSafe,
<<R as BattleRules>::CR as CharacterRules<R>>::Statistic: Id + RefUnwindSafe,
<<R as BattleRules>::CR as CharacterRules<R>>::Status: Id + RefUnwindSafe,
<R as BattleRules>::TR: TeamRules<R>,
impl<R> Send for Entities<R> where
<R as BattleRules>::AR: ActorRules<R>,
<<R as BattleRules>::AR as ActorRules<R>>::Ability: Id + Send,
<R as BattleRules>::CR: CharacterRules<R>,
<<R as BattleRules>::CR as CharacterRules<R>>::CreatureId: Send,
<<<R as BattleRules>::AR as ActorRules<R>>::Ability as Id>::Id: Send,
<<<R as BattleRules>::CR as CharacterRules<R>>::Statistic as Id>::Id: Send,
<<<R as BattleRules>::CR as CharacterRules<R>>::Status as Id>::Id: Send,
<<R as BattleRules>::TR as TeamRules<R>>::Id: Send,
<<R as BattleRules>::CR as CharacterRules<R>>::ObjectId: Send,
<<R as BattleRules>::TR as TeamRules<R>>::Objectives: Send,
<<R as BattleRules>::SR as SpaceRules<R>>::Position: Send,
<<R as BattleRules>::CR as CharacterRules<R>>::Statistic: Id + Send,
<<R as BattleRules>::CR as CharacterRules<R>>::Status: Id + Send,
<R as BattleRules>::TR: TeamRules<R>,
<R as BattleRules>::AR: ActorRules<R>,
<<R as BattleRules>::AR as ActorRules<R>>::Ability: Id + Send,
<R as BattleRules>::CR: CharacterRules<R>,
<<R as BattleRules>::CR as CharacterRules<R>>::CreatureId: Send,
<<<R as BattleRules>::AR as ActorRules<R>>::Ability as Id>::Id: Send,
<<<R as BattleRules>::CR as CharacterRules<R>>::Statistic as Id>::Id: Send,
<<<R as BattleRules>::CR as CharacterRules<R>>::Status as Id>::Id: Send,
<<R as BattleRules>::TR as TeamRules<R>>::Id: Send,
<<R as BattleRules>::CR as CharacterRules<R>>::ObjectId: Send,
<<R as BattleRules>::TR as TeamRules<R>>::Objectives: Send,
<<R as BattleRules>::SR as SpaceRules<R>>::Position: Send,
<<R as BattleRules>::CR as CharacterRules<R>>::Statistic: Id + Send,
<<R as BattleRules>::CR as CharacterRules<R>>::Status: Id + Send,
<R as BattleRules>::TR: TeamRules<R>,
impl<R> Sync for Entities<R> where
<R as BattleRules>::AR: ActorRules<R>,
<<R as BattleRules>::AR as ActorRules<R>>::Ability: Id + Sync,
<R as BattleRules>::CR: CharacterRules<R>,
<<R as BattleRules>::CR as CharacterRules<R>>::CreatureId: Sync,
<<<R as BattleRules>::AR as ActorRules<R>>::Ability as Id>::Id: Sync,
<<<R as BattleRules>::CR as CharacterRules<R>>::Statistic as Id>::Id: Sync,
<<<R as BattleRules>::CR as CharacterRules<R>>::Status as Id>::Id: Sync,
<<R as BattleRules>::TR as TeamRules<R>>::Id: Sync,
<<R as BattleRules>::CR as CharacterRules<R>>::ObjectId: Sync,
<<R as BattleRules>::TR as TeamRules<R>>::Objectives: Sync,
<<R as BattleRules>::SR as SpaceRules<R>>::Position: Sync,
<<R as BattleRules>::CR as CharacterRules<R>>::Statistic: Id + Sync,
<<R as BattleRules>::CR as CharacterRules<R>>::Status: Id + Sync,
<R as BattleRules>::TR: TeamRules<R>,
<R as BattleRules>::AR: ActorRules<R>,
<<R as BattleRules>::AR as ActorRules<R>>::Ability: Id + Sync,
<R as BattleRules>::CR: CharacterRules<R>,
<<R as BattleRules>::CR as CharacterRules<R>>::CreatureId: Sync,
<<<R as BattleRules>::AR as ActorRules<R>>::Ability as Id>::Id: Sync,
<<<R as BattleRules>::CR as CharacterRules<R>>::Statistic as Id>::Id: Sync,
<<<R as BattleRules>::CR as CharacterRules<R>>::Status as Id>::Id: Sync,
<<R as BattleRules>::TR as TeamRules<R>>::Id: Sync,
<<R as BattleRules>::CR as CharacterRules<R>>::ObjectId: Sync,
<<R as BattleRules>::TR as TeamRules<R>>::Objectives: Sync,
<<R as BattleRules>::SR as SpaceRules<R>>::Position: Sync,
<<R as BattleRules>::CR as CharacterRules<R>>::Statistic: Id + Sync,
<<R as BattleRules>::CR as CharacterRules<R>>::Status: Id + Sync,
<R as BattleRules>::TR: TeamRules<R>,
impl<R> Unpin for Entities<R> where
<R as BattleRules>::AR: ActorRules<R>,
<<R as BattleRules>::AR as ActorRules<R>>::Ability: Id + Unpin,
<R as BattleRules>::CR: CharacterRules<R>,
<<R as BattleRules>::CR as CharacterRules<R>>::CreatureId: Unpin,
<<<R as BattleRules>::AR as ActorRules<R>>::Ability as Id>::Id: Unpin,
<<<R as BattleRules>::CR as CharacterRules<R>>::Statistic as Id>::Id: Unpin,
<<<R as BattleRules>::CR as CharacterRules<R>>::Status as Id>::Id: Unpin,
<<R as BattleRules>::TR as TeamRules<R>>::Id: Unpin,
<<R as BattleRules>::CR as CharacterRules<R>>::ObjectId: Unpin,
<<R as BattleRules>::TR as TeamRules<R>>::Objectives: Unpin,
<<R as BattleRules>::SR as SpaceRules<R>>::Position: Unpin,
<<R as BattleRules>::CR as CharacterRules<R>>::Statistic: Id + Unpin,
<<R as BattleRules>::CR as CharacterRules<R>>::Status: Id + Unpin,
<R as BattleRules>::TR: TeamRules<R>,
<R as BattleRules>::AR: ActorRules<R>,
<<R as BattleRules>::AR as ActorRules<R>>::Ability: Id + Unpin,
<R as BattleRules>::CR: CharacterRules<R>,
<<R as BattleRules>::CR as CharacterRules<R>>::CreatureId: Unpin,
<<<R as BattleRules>::AR as ActorRules<R>>::Ability as Id>::Id: Unpin,
<<<R as BattleRules>::CR as CharacterRules<R>>::Statistic as Id>::Id: Unpin,
<<<R as BattleRules>::CR as CharacterRules<R>>::Status as Id>::Id: Unpin,
<<R as BattleRules>::TR as TeamRules<R>>::Id: Unpin,
<<R as BattleRules>::CR as CharacterRules<R>>::ObjectId: Unpin,
<<R as BattleRules>::TR as TeamRules<R>>::Objectives: Unpin,
<<R as BattleRules>::SR as SpaceRules<R>>::Position: Unpin,
<<R as BattleRules>::CR as CharacterRules<R>>::Statistic: Id + Unpin,
<<R as BattleRules>::CR as CharacterRules<R>>::Status: Id + Unpin,
<R as BattleRules>::TR: TeamRules<R>,
impl<R> UnwindSafe for Entities<R> where
<R as BattleRules>::AR: ActorRules<R>,
<<R as BattleRules>::AR as ActorRules<R>>::Ability: Id + UnwindSafe,
<R as BattleRules>::CR: CharacterRules<R>,
<<R as BattleRules>::CR as CharacterRules<R>>::CreatureId: UnwindSafe,
<<<R as BattleRules>::AR as ActorRules<R>>::Ability as Id>::Id: UnwindSafe,
<<<R as BattleRules>::CR as CharacterRules<R>>::Statistic as Id>::Id: UnwindSafe,
<<<R as BattleRules>::CR as CharacterRules<R>>::Status as Id>::Id: UnwindSafe,
<<R as BattleRules>::TR as TeamRules<R>>::Id: UnwindSafe,
<<R as BattleRules>::CR as CharacterRules<R>>::ObjectId: UnwindSafe,
<<R as BattleRules>::TR as TeamRules<R>>::Objectives: UnwindSafe,
<<R as BattleRules>::SR as SpaceRules<R>>::Position: UnwindSafe,
<<R as BattleRules>::CR as CharacterRules<R>>::Statistic: Id + UnwindSafe,
<<R as BattleRules>::CR as CharacterRules<R>>::Status: Id + UnwindSafe,
<R as BattleRules>::TR: TeamRules<R>,
<R as BattleRules>::AR: ActorRules<R>,
<<R as BattleRules>::AR as ActorRules<R>>::Ability: Id + UnwindSafe,
<R as BattleRules>::CR: CharacterRules<R>,
<<R as BattleRules>::CR as CharacterRules<R>>::CreatureId: UnwindSafe,
<<<R as BattleRules>::AR as ActorRules<R>>::Ability as Id>::Id: UnwindSafe,
<<<R as BattleRules>::CR as CharacterRules<R>>::Statistic as Id>::Id: UnwindSafe,
<<<R as BattleRules>::CR as CharacterRules<R>>::Status as Id>::Id: UnwindSafe,
<<R as BattleRules>::TR as TeamRules<R>>::Id: UnwindSafe,
<<R as BattleRules>::CR as CharacterRules<R>>::ObjectId: UnwindSafe,
<<R as BattleRules>::TR as TeamRules<R>>::Objectives: UnwindSafe,
<<R as BattleRules>::SR as SpaceRules<R>>::Position: UnwindSafe,
<<R as BattleRules>::CR as CharacterRules<R>>::Statistic: Id + UnwindSafe,
<<R as BattleRules>::CR as CharacterRules<R>>::Status: Id + UnwindSafe,
<R as BattleRules>::TR: TeamRules<R>,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,