[][src]Struct weasel::round::EnvironmentTurn

pub struct EnvironmentTurn<R> { /* fields omitted */ }

Event to perform a collective turn for the environment's inanimate entities.
The purpose of this event is to update the statuses of all objects.

Examples

use weasel::{
    battle_rules, rules::empty::*, Battle, BattleController, BattleRules, EnvironmentTurn,
    EventTrigger, Server,
};

battle_rules! {}

let battle = Battle::builder(CustomRules::new()).build();
let mut server = Server::builder(battle).build();

EnvironmentTurn::trigger(&mut server).fire().unwrap();
assert_eq!(
    server.battle().rounds().completed_turns(),
    1
);

Implementations

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

pub fn trigger<P: EventProcessor<R>>(
    processor: &mut P
) -> EnvironmentTurnTrigger<'_, R, P>
[src]

Returns a trigger for this event.

Trait Implementations

impl<R> Clone for EnvironmentTurn<R>[src]

impl<R> Debug for EnvironmentTurn<R>[src]

impl<'de, R> Deserialize<'de> for EnvironmentTurn<R>[src]

impl<R: BattleRules + 'static> Event<R> for EnvironmentTurn<R>[src]

impl<R> Serialize for EnvironmentTurn<R>[src]

Auto Trait Implementations

impl<R> RefUnwindSafe for EnvironmentTurn<R> where
    R: RefUnwindSafe

impl<R> Send for EnvironmentTurn<R> where
    R: Send

impl<R> Sync for EnvironmentTurn<R> where
    R: Sync

impl<R> Unpin for EnvironmentTurn<R> where
    R: Unpin

impl<R> UnwindSafe for EnvironmentTurn<R> where
    R: 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: for<'de> 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, 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>,