Struct BattleState

Source
pub struct BattleState<R: BattleRules> { /* private fields */ }
Expand description

Owns he battle submodules that contain the current state of the battle.

Implementations§

Source§

impl<R: BattleRules> BattleState<R>

Source

pub fn entities(&self) -> &Entities<R>

Returns the entities manager for this battle.

Source

pub fn space(&self) -> &Space<R>

Returns this battle’s space representation.

Source

pub fn rounds(&self) -> &Rounds<R>

Returns the rounds manager for this battle.

Source

pub fn phase(&self) -> BattlePhase

Returns in which phase is the battle.

Auto Trait Implementations§

§

impl<R> Freeze for BattleState<R>
where <<R as BattleRules>::SR as SpaceRules<R>>::SpaceModel: Freeze, <R as BattleRules>::SR: Freeze, <<R as BattleRules>::RR as RoundsRules<R>>::RoundsModel: Freeze, <R as BattleRules>::RR: Freeze,

§

impl<R> RefUnwindSafe for BattleState<R>

§

impl<R> Send for BattleState<R>
where <<R as BattleRules>::SR as SpaceRules<R>>::SpaceModel: Send, <R as BattleRules>::SR: Send, <<R as BattleRules>::RR as RoundsRules<R>>::RoundsModel: Send, <R as BattleRules>::RR: 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>>::Statistic: Send, <<R as BattleRules>::AR as ActorRules<R>>::Ability: Send, <<R as BattleRules>::CR as CharacterRules<R>>::Status: Send,

§

impl<R> Sync for BattleState<R>
where <<R as BattleRules>::SR as SpaceRules<R>>::SpaceModel: Sync, <R as BattleRules>::SR: Sync, <<R as BattleRules>::RR as RoundsRules<R>>::RoundsModel: Sync, <R as BattleRules>::RR: Sync, <<R as BattleRules>::TR as TeamRules<R>>::Id: Sync, <<R as BattleRules>::CR as CharacterRules<R>>::CreatureId: 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>::TR as TeamRules<R>>::Power as Id>::Id: Sync, <<R as BattleRules>::TR as TeamRules<R>>::Power: Sync, <<<R as BattleRules>::CR as CharacterRules<R>>::Statistic as Id>::Id: Sync, <<R as BattleRules>::CR as CharacterRules<R>>::Statistic: Sync, <<<R as BattleRules>::CR as CharacterRules<R>>::Status as Id>::Id: Sync, <<<R as BattleRules>::AR as ActorRules<R>>::Ability as Id>::Id: Sync, <<R as BattleRules>::AR as ActorRules<R>>::Ability: Sync, <<R as BattleRules>::CR as CharacterRules<R>>::Status: Sync,

§

impl<R> Unpin for BattleState<R>
where <<R as BattleRules>::SR as SpaceRules<R>>::SpaceModel: Unpin, <R as BattleRules>::SR: Unpin, <<R as BattleRules>::RR as RoundsRules<R>>::RoundsModel: Unpin, <R as BattleRules>::RR: Unpin, <<R as BattleRules>::TR as TeamRules<R>>::Id: Unpin, <<R as BattleRules>::CR as CharacterRules<R>>::CreatureId: 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>::TR as TeamRules<R>>::Power as Id>::Id: Unpin, <<R as BattleRules>::TR as TeamRules<R>>::Power: Unpin, <<<R as BattleRules>::CR as CharacterRules<R>>::Statistic as Id>::Id: Unpin, <<R as BattleRules>::CR as CharacterRules<R>>::Statistic: Unpin, <<<R as BattleRules>::CR as CharacterRules<R>>::Status as Id>::Id: Unpin, <<<R as BattleRules>::AR as ActorRules<R>>::Ability as Id>::Id: Unpin, <<R as BattleRules>::AR as ActorRules<R>>::Ability: Unpin, <<R as BattleRules>::CR as CharacterRules<R>>::Status: Unpin,

§

impl<R> UnwindSafe for BattleState<R>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

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

Source§

fn vzip(self) -> V