[−][src]Struct weasel::team::Team
A team is an alliance of entities.
A team represents the unit of control of a player. Teams must achieve their objectives in order to win the battle.
Implementations
impl<R: BattleRules> Team<R>
[src]
pub fn creatures(&self) -> impl Iterator<Item = &CreatureId<R>>
[src]
Returns an iterator over creatures.
pub fn powers(&self) -> impl Iterator<Item = &Power<R>>
[src]
Returns an iterator over powers.
pub fn powers_mut(&mut self) -> impl Iterator<Item = &mut Power<R>>
[src]
Returns a mutable iterator over powers.
pub fn power(&self, id: &PowerId<R>) -> Option<&Power<R>>
[src]
Returns the power with the given id.
pub fn power_mut(&mut self, id: &PowerId<R>) -> Option<&mut Power<R>>
[src]
Returns a mutable reference to the power with the given id.
pub fn add_power(&mut self, power: Power<R>) -> Option<Power<R>>
[src]
Adds a new power. Replaces an existing power with the same id. Returns the replaced power, if present.
pub fn remove_power(&mut self, id: &PowerId<R>) -> Option<Power<R>>
[src]
Removes a power. Returns the removed power, if present.
pub fn conclusion(&self) -> Option<Conclusion>
[src]
Returns the conclusion reached by this team, if any.
pub fn objectives(&self) -> &Objectives<R>
[src]
Returns the team's objectives.
Trait Implementations
impl<R: BattleRules> Id for Team<R>
[src]
Auto Trait Implementations
impl<R> RefUnwindSafe for Team<R> where
<<R as BattleRules>::CR as CharacterRules<R>>::CreatureId: RefUnwindSafe,
<<<R as BattleRules>::TR as TeamRules<R>>::Power as Id>::Id: RefUnwindSafe,
<<R as BattleRules>::TR as TeamRules<R>>::Id: RefUnwindSafe,
<<R as BattleRules>::TR as TeamRules<R>>::Objectives: RefUnwindSafe,
<<R as BattleRules>::TR as TeamRules<R>>::Power: RefUnwindSafe,
<<R as BattleRules>::CR as CharacterRules<R>>::CreatureId: RefUnwindSafe,
<<<R as BattleRules>::TR as TeamRules<R>>::Power as Id>::Id: RefUnwindSafe,
<<R as BattleRules>::TR as TeamRules<R>>::Id: RefUnwindSafe,
<<R as BattleRules>::TR as TeamRules<R>>::Objectives: RefUnwindSafe,
<<R as BattleRules>::TR as TeamRules<R>>::Power: RefUnwindSafe,
impl<R> Send for Team<R> where
<<R as BattleRules>::CR as CharacterRules<R>>::CreatureId: Send,
<<<R as BattleRules>::TR as TeamRules<R>>::Power as Id>::Id: Send,
<<R as BattleRules>::TR as TeamRules<R>>::Id: Send,
<<R as BattleRules>::TR as TeamRules<R>>::Objectives: Send,
<<R as BattleRules>::TR as TeamRules<R>>::Power: Send,
<<R as BattleRules>::CR as CharacterRules<R>>::CreatureId: Send,
<<<R as BattleRules>::TR as TeamRules<R>>::Power as Id>::Id: Send,
<<R as BattleRules>::TR as TeamRules<R>>::Id: Send,
<<R as BattleRules>::TR as TeamRules<R>>::Objectives: Send,
<<R as BattleRules>::TR as TeamRules<R>>::Power: Send,
impl<R> Sync for Team<R> where
<<R as BattleRules>::CR as CharacterRules<R>>::CreatureId: Sync,
<<<R as BattleRules>::TR as TeamRules<R>>::Power as Id>::Id: Sync,
<<R as BattleRules>::TR as TeamRules<R>>::Id: Sync,
<<R as BattleRules>::TR as TeamRules<R>>::Objectives: Sync,
<<R as BattleRules>::TR as TeamRules<R>>::Power: Sync,
<<R as BattleRules>::CR as CharacterRules<R>>::CreatureId: Sync,
<<<R as BattleRules>::TR as TeamRules<R>>::Power as Id>::Id: Sync,
<<R as BattleRules>::TR as TeamRules<R>>::Id: Sync,
<<R as BattleRules>::TR as TeamRules<R>>::Objectives: Sync,
<<R as BattleRules>::TR as TeamRules<R>>::Power: Sync,
impl<R> Unpin for Team<R> where
<<R as BattleRules>::CR as CharacterRules<R>>::CreatureId: Unpin,
<<<R as BattleRules>::TR as TeamRules<R>>::Power as Id>::Id: Unpin,
<<R as BattleRules>::TR as TeamRules<R>>::Id: Unpin,
<<R as BattleRules>::TR as TeamRules<R>>::Objectives: Unpin,
<<R as BattleRules>::TR as TeamRules<R>>::Power: Unpin,
<<R as BattleRules>::CR as CharacterRules<R>>::CreatureId: Unpin,
<<<R as BattleRules>::TR as TeamRules<R>>::Power as Id>::Id: Unpin,
<<R as BattleRules>::TR as TeamRules<R>>::Id: Unpin,
<<R as BattleRules>::TR as TeamRules<R>>::Objectives: Unpin,
<<R as BattleRules>::TR as TeamRules<R>>::Power: Unpin,
impl<R> UnwindSafe for Team<R> where
<<R as BattleRules>::CR as CharacterRules<R>>::CreatureId: UnwindSafe,
<<<R as BattleRules>::TR as TeamRules<R>>::Power as Id>::Id: UnwindSafe,
<<R as BattleRules>::TR as TeamRules<R>>::Id: UnwindSafe,
<<R as BattleRules>::TR as TeamRules<R>>::Objectives: UnwindSafe,
<<R as BattleRules>::TR as TeamRules<R>>::Power: UnwindSafe,
<<R as BattleRules>::CR as CharacterRules<R>>::CreatureId: UnwindSafe,
<<<R as BattleRules>::TR as TeamRules<R>>::Power as Id>::Id: UnwindSafe,
<<R as BattleRules>::TR as TeamRules<R>>::Id: UnwindSafe,
<<R as BattleRules>::TR as TeamRules<R>>::Objectives: UnwindSafe,
<<R as BattleRules>::TR as TeamRules<R>>::Power: UnwindSafe,
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,
pub 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.
pub 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.
pub 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>,