[][src]Enum weasel::serde::FlatEvent

pub enum FlatEvent<R: BattleRules> {
    DummyEvent(DummyEvent<R>),
    CreateTeam(CreateTeam<R>),
    CreateCreature(CreateCreature<R>),
    CreateObject(CreateObject<R>),
    MoveEntity(MoveEntity<R>),
    StartTurn(StartTurn<R>),
    EndTurn(EndTurn<R>),
    EndRound(EndRound<R>),
    EnvironmentTurn(EnvironmentTurn<R>),
    ActivateAbility(ActivateAbility<R>),
    InvokePower(InvokePower<R>),
    ApplyImpact(ApplyImpact<R>),
    AlterStatistics(AlterStatistics<R>),
    AlterStatuses(AlterStatuses<R>),
    AlterAbilities(AlterAbilities<R>),
    AlterPowers(AlterPowers<R>),
    RegenerateStatistics(RegenerateStatistics<R>),
    RegenerateAbilities(RegenerateAbilities<R>),
    RegeneratePowers(RegeneratePowers<R>),
    InflictStatus(InflictStatus<R>),
    ClearStatus(ClearStatus<R>),
    ConvertCreature(ConvertCreature<R>),
    SetRelations(SetRelations<R>),
    ConcludeObjectives(ConcludeObjectives<R>),
    RemoveCreature(RemoveCreature<R>),
    RemoveObject(RemoveObject<R>),
    RemoveTeam(RemoveTeam<R>),
    AlterSpace(AlterSpace<R>),
    ResetEntropy(ResetEntropy<R>),
    ResetObjectives(ResetObjectives<R>),
    ResetRounds(ResetRounds<R>),
    ResetSpace(ResetSpace<R>),
    EndBattle(EndBattle<R>),
    UserEventPackage(UserEventPackage<R>),
}

An enum representation of event trait objects.

Variants

DummyEvent(DummyEvent<R>)
CreateTeam(CreateTeam<R>)
CreateCreature(CreateCreature<R>)
CreateObject(CreateObject<R>)
MoveEntity(MoveEntity<R>)
StartTurn(StartTurn<R>)
EndTurn(EndTurn<R>)
EndRound(EndRound<R>)
EnvironmentTurn(EnvironmentTurn<R>)
ActivateAbility(ActivateAbility<R>)
InvokePower(InvokePower<R>)
ApplyImpact(ApplyImpact<R>)
AlterStatistics(AlterStatistics<R>)
AlterStatuses(AlterStatuses<R>)
AlterAbilities(AlterAbilities<R>)
AlterPowers(AlterPowers<R>)
RegenerateStatistics(RegenerateStatistics<R>)
RegenerateAbilities(RegenerateAbilities<R>)
RegeneratePowers(RegeneratePowers<R>)
InflictStatus(InflictStatus<R>)
ClearStatus(ClearStatus<R>)
ConvertCreature(ConvertCreature<R>)
SetRelations(SetRelations<R>)
ConcludeObjectives(ConcludeObjectives<R>)
RemoveCreature(RemoveCreature<R>)
RemoveObject(RemoveObject<R>)
RemoveTeam(RemoveTeam<R>)
AlterSpace(AlterSpace<R>)
ResetEntropy(ResetEntropy<R>)
ResetObjectives(ResetObjectives<R>)
ResetRounds(ResetRounds<R>)
ResetSpace(ResetSpace<R>)
EndBattle(EndBattle<R>)
UserEventPackage(UserEventPackage<R>)

Implementations

impl<R: BattleRules + 'static> FlatEvent<R>[src]

pub fn boxed(self) -> Box<dyn Event<R> + Send>[src]

Transforms this flattened event into a boxed event trait object.

pub fn flattened(event: Box<dyn Event<R> + Send>) -> FlatEvent<R>[src]

Transforms a boxed event trait object into a flattened event.

Trait Implementations

impl<'de, R: BattleRules> Deserialize<'de> for FlatEvent<R> where
    DummyEvent<R>: Deserialize<'de>,
    CreateTeam<R>: Deserialize<'de>,
    CreateCreature<R>: Deserialize<'de>,
    CreateObject<R>: Deserialize<'de>,
    MoveEntity<R>: Deserialize<'de>,
    StartTurn<R>: Deserialize<'de>,
    EndTurn<R>: Deserialize<'de>,
    EndRound<R>: Deserialize<'de>,
    EnvironmentTurn<R>: Deserialize<'de>,
    ActivateAbility<R>: Deserialize<'de>,
    InvokePower<R>: Deserialize<'de>,
    ApplyImpact<R>: Deserialize<'de>,
    AlterStatistics<R>: Deserialize<'de>,
    AlterStatuses<R>: Deserialize<'de>,
    AlterAbilities<R>: Deserialize<'de>,
    AlterPowers<R>: Deserialize<'de>,
    RegenerateStatistics<R>: Deserialize<'de>,
    RegenerateAbilities<R>: Deserialize<'de>,
    RegeneratePowers<R>: Deserialize<'de>,
    InflictStatus<R>: Deserialize<'de>,
    ClearStatus<R>: Deserialize<'de>,
    ConvertCreature<R>: Deserialize<'de>,
    SetRelations<R>: Deserialize<'de>,
    ConcludeObjectives<R>: Deserialize<'de>,
    RemoveCreature<R>: Deserialize<'de>,
    RemoveObject<R>: Deserialize<'de>,
    RemoveTeam<R>: Deserialize<'de>,
    AlterSpace<R>: Deserialize<'de>,
    ResetEntropy<R>: Deserialize<'de>,
    ResetObjectives<R>: Deserialize<'de>,
    ResetRounds<R>: Deserialize<'de>,
    ResetSpace<R>: Deserialize<'de>,
    EndBattle<R>: Deserialize<'de>,
    UserEventPackage<R>: Deserialize<'de>, 
[src]

impl<R: BattleRules> Serialize for FlatEvent<R> where
    DummyEvent<R>: Serialize,
    CreateTeam<R>: Serialize,
    CreateCreature<R>: Serialize,
    CreateObject<R>: Serialize,
    MoveEntity<R>: Serialize,
    StartTurn<R>: Serialize,
    EndTurn<R>: Serialize,
    EndRound<R>: Serialize,
    EnvironmentTurn<R>: Serialize,
    ActivateAbility<R>: Serialize,
    InvokePower<R>: Serialize,
    ApplyImpact<R>: Serialize,
    AlterStatistics<R>: Serialize,
    AlterStatuses<R>: Serialize,
    AlterAbilities<R>: Serialize,
    AlterPowers<R>: Serialize,
    RegenerateStatistics<R>: Serialize,
    RegenerateAbilities<R>: Serialize,
    RegeneratePowers<R>: Serialize,
    InflictStatus<R>: Serialize,
    ClearStatus<R>: Serialize,
    ConvertCreature<R>: Serialize,
    SetRelations<R>: Serialize,
    ConcludeObjectives<R>: Serialize,
    RemoveCreature<R>: Serialize,
    RemoveObject<R>: Serialize,
    RemoveTeam<R>: Serialize,
    AlterSpace<R>: Serialize,
    ResetEntropy<R>: Serialize,
    ResetObjectives<R>: Serialize,
    ResetRounds<R>: Serialize,
    ResetSpace<R>: Serialize,
    EndBattle<R>: Serialize,
    UserEventPackage<R>: Serialize
[src]

Auto Trait Implementations

impl<R> RefUnwindSafe for FlatEvent<R> where
    R: RefUnwindSafe,
    <<R as BattleRules>::AR as ActorRules<R>>::AbilitiesAlteration: RefUnwindSafe,
    <<R as BattleRules>::AR as ActorRules<R>>::AbilitiesSeed: RefUnwindSafe,
    <<R as BattleRules>::AR as ActorRules<R>>::Activation: RefUnwindSafe,
    <<R as BattleRules>::CR as CharacterRules<R>>::CreatureId: RefUnwindSafe,
    <<R as BattleRules>::ER as EntropyRules>::EntropySeed: RefUnwindSafe,
    <<<R as BattleRules>::AR as ActorRules<R>>::Ability as Id>::Id: RefUnwindSafe,
    <<<R as BattleRules>::TR as TeamRules<R>>::Power 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>::FR as FightRules<R>>::Impact: RefUnwindSafe,
    <<R as BattleRules>::TR as TeamRules<R>>::Invocation: RefUnwindSafe,
    <<R as BattleRules>::CR as CharacterRules<R>>::ObjectId: RefUnwindSafe,
    <<R as BattleRules>::TR as TeamRules<R>>::ObjectivesSeed: RefUnwindSafe,
    <<R as BattleRules>::SR as SpaceRules<R>>::Position: RefUnwindSafe,
    <<R as BattleRules>::FR as FightRules<R>>::Potency: RefUnwindSafe,
    <<R as BattleRules>::TR as TeamRules<R>>::PowersAlteration: RefUnwindSafe,
    <<R as BattleRules>::TR as TeamRules<R>>::PowersSeed: RefUnwindSafe,
    <<R as BattleRules>::RR as RoundsRules<R>>::RoundsSeed: RefUnwindSafe,
    <<R as BattleRules>::SR as SpaceRules<R>>::SpaceAlteration: RefUnwindSafe,
    <<R as BattleRules>::SR as SpaceRules<R>>::SpaceSeed: RefUnwindSafe,
    <<R as BattleRules>::CR as CharacterRules<R>>::StatisticsAlteration: RefUnwindSafe,
    <<R as BattleRules>::CR as CharacterRules<R>>::StatisticsSeed: RefUnwindSafe,
    <<R as BattleRules>::CR as CharacterRules<R>>::StatusesAlteration: RefUnwindSafe,
    <<R as BattleRules>::UR as UserRules<R>>::UserEventPackage: RefUnwindSafe

impl<R> Send for FlatEvent<R> where
    <<R as BattleRules>::AR as ActorRules<R>>::AbilitiesAlteration: Send,
    <<R as BattleRules>::AR as ActorRules<R>>::AbilitiesSeed: Send,
    <<R as BattleRules>::AR as ActorRules<R>>::Activation: Send,
    <<R as BattleRules>::CR as CharacterRules<R>>::CreatureId: Send,
    <<R as BattleRules>::ER as EntropyRules>::EntropySeed: Send,
    <<<R as BattleRules>::AR as ActorRules<R>>::Ability as Id>::Id: Send,
    <<<R as BattleRules>::TR as TeamRules<R>>::Power 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>::FR as FightRules<R>>::Impact: Send,
    <<R as BattleRules>::TR as TeamRules<R>>::Invocation: Send,
    <<R as BattleRules>::CR as CharacterRules<R>>::ObjectId: Send,
    <<R as BattleRules>::TR as TeamRules<R>>::ObjectivesSeed: Send,
    <<R as BattleRules>::SR as SpaceRules<R>>::Position: Send,
    <<R as BattleRules>::FR as FightRules<R>>::Potency: Send,
    <<R as BattleRules>::TR as TeamRules<R>>::PowersAlteration: Send,
    <<R as BattleRules>::TR as TeamRules<R>>::PowersSeed: Send,
    <<R as BattleRules>::RR as RoundsRules<R>>::RoundsSeed: Send,
    <<R as BattleRules>::SR as SpaceRules<R>>::SpaceAlteration: Send,
    <<R as BattleRules>::SR as SpaceRules<R>>::SpaceSeed: Send,
    <<R as BattleRules>::CR as CharacterRules<R>>::StatisticsAlteration: Send,
    <<R as BattleRules>::CR as CharacterRules<R>>::StatisticsSeed: Send,
    <<R as BattleRules>::CR as CharacterRules<R>>::StatusesAlteration: Send,
    <<R as BattleRules>::UR as UserRules<R>>::UserEventPackage: Send

impl<R> Sync for FlatEvent<R> where
    R: Sync,
    <<R as BattleRules>::AR as ActorRules<R>>::AbilitiesAlteration: Sync,
    <<R as BattleRules>::AR as ActorRules<R>>::AbilitiesSeed: Sync,
    <<R as BattleRules>::AR as ActorRules<R>>::Activation: Sync,
    <<R as BattleRules>::CR as CharacterRules<R>>::CreatureId: Sync,
    <<R as BattleRules>::ER as EntropyRules>::EntropySeed: Sync,
    <<<R as BattleRules>::AR as ActorRules<R>>::Ability as Id>::Id: Sync,
    <<<R as BattleRules>::TR as TeamRules<R>>::Power 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>::FR as FightRules<R>>::Impact: Sync,
    <<R as BattleRules>::TR as TeamRules<R>>::Invocation: Sync,
    <<R as BattleRules>::CR as CharacterRules<R>>::ObjectId: Sync,
    <<R as BattleRules>::TR as TeamRules<R>>::ObjectivesSeed: Sync,
    <<R as BattleRules>::SR as SpaceRules<R>>::Position: Sync,
    <<R as BattleRules>::FR as FightRules<R>>::Potency: Sync,
    <<R as BattleRules>::TR as TeamRules<R>>::PowersAlteration: Sync,
    <<R as BattleRules>::TR as TeamRules<R>>::PowersSeed: Sync,
    <<R as BattleRules>::RR as RoundsRules<R>>::RoundsSeed: Sync,
    <<R as BattleRules>::SR as SpaceRules<R>>::SpaceAlteration: Sync,
    <<R as BattleRules>::SR as SpaceRules<R>>::SpaceSeed: Sync,
    <<R as BattleRules>::CR as CharacterRules<R>>::StatisticsAlteration: Sync,
    <<R as BattleRules>::CR as CharacterRules<R>>::StatisticsSeed: Sync,
    <<R as BattleRules>::CR as CharacterRules<R>>::StatusesAlteration: Sync,
    <<R as BattleRules>::UR as UserRules<R>>::UserEventPackage: Sync

impl<R> Unpin for FlatEvent<R> where
    R: Unpin,
    <<R as BattleRules>::AR as ActorRules<R>>::AbilitiesAlteration: Unpin,
    <<R as BattleRules>::AR as ActorRules<R>>::AbilitiesSeed: Unpin,
    <<R as BattleRules>::AR as ActorRules<R>>::Activation: Unpin,
    <<R as BattleRules>::CR as CharacterRules<R>>::CreatureId: Unpin,
    <<R as BattleRules>::ER as EntropyRules>::EntropySeed: Unpin,
    <<<R as BattleRules>::AR as ActorRules<R>>::Ability as Id>::Id: Unpin,
    <<<R as BattleRules>::TR as TeamRules<R>>::Power 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>::FR as FightRules<R>>::Impact: Unpin,
    <<R as BattleRules>::TR as TeamRules<R>>::Invocation: Unpin,
    <<R as BattleRules>::CR as CharacterRules<R>>::ObjectId: Unpin,
    <<R as BattleRules>::TR as TeamRules<R>>::ObjectivesSeed: Unpin,
    <<R as BattleRules>::SR as SpaceRules<R>>::Position: Unpin,
    <<R as BattleRules>::FR as FightRules<R>>::Potency: Unpin,
    <<R as BattleRules>::TR as TeamRules<R>>::PowersAlteration: Unpin,
    <<R as BattleRules>::TR as TeamRules<R>>::PowersSeed: Unpin,
    <<R as BattleRules>::RR as RoundsRules<R>>::RoundsSeed: Unpin,
    <<R as BattleRules>::SR as SpaceRules<R>>::SpaceAlteration: Unpin,
    <<R as BattleRules>::SR as SpaceRules<R>>::SpaceSeed: Unpin,
    <<R as BattleRules>::CR as CharacterRules<R>>::StatisticsAlteration: Unpin,
    <<R as BattleRules>::CR as CharacterRules<R>>::StatisticsSeed: Unpin,
    <<R as BattleRules>::CR as CharacterRules<R>>::StatusesAlteration: Unpin,
    <<R as BattleRules>::UR as UserRules<R>>::UserEventPackage: Unpin

impl<R> UnwindSafe for FlatEvent<R> where
    R: UnwindSafe,
    <<R as BattleRules>::AR as ActorRules<R>>::AbilitiesAlteration: UnwindSafe,
    <<R as BattleRules>::AR as ActorRules<R>>::AbilitiesSeed: UnwindSafe,
    <<R as BattleRules>::AR as ActorRules<R>>::Activation: UnwindSafe,
    <<R as BattleRules>::CR as CharacterRules<R>>::CreatureId: UnwindSafe,
    <<R as BattleRules>::ER as EntropyRules>::EntropySeed: UnwindSafe,
    <<<R as BattleRules>::AR as ActorRules<R>>::Ability as Id>::Id: UnwindSafe,
    <<<R as BattleRules>::TR as TeamRules<R>>::Power 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>::FR as FightRules<R>>::Impact: UnwindSafe,
    <<R as BattleRules>::TR as TeamRules<R>>::Invocation: UnwindSafe,
    <<R as BattleRules>::CR as CharacterRules<R>>::ObjectId: UnwindSafe,
    <<R as BattleRules>::TR as TeamRules<R>>::ObjectivesSeed: UnwindSafe,
    <<R as BattleRules>::SR as SpaceRules<R>>::Position: UnwindSafe,
    <<R as BattleRules>::FR as FightRules<R>>::Potency: UnwindSafe,
    <<R as BattleRules>::TR as TeamRules<R>>::PowersAlteration: UnwindSafe,
    <<R as BattleRules>::TR as TeamRules<R>>::PowersSeed: UnwindSafe,
    <<R as BattleRules>::RR as RoundsRules<R>>::RoundsSeed: UnwindSafe,
    <<R as BattleRules>::SR as SpaceRules<R>>::SpaceAlteration: UnwindSafe,
    <<R as BattleRules>::SR as SpaceRules<R>>::SpaceSeed: UnwindSafe,
    <<R as BattleRules>::CR as CharacterRules<R>>::StatisticsAlteration: UnwindSafe,
    <<R as BattleRules>::CR as CharacterRules<R>>::StatisticsSeed: UnwindSafe,
    <<R as BattleRules>::CR as CharacterRules<R>>::StatusesAlteration: UnwindSafe,
    <<R as BattleRules>::UR as UserRules<R>>::UserEventPackage: 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, 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>,