pub enum PhaseType {
Show 13 variants
Untap,
Upkeep,
Draw,
Main1,
CombatBegin,
CombatDeclareAttackers,
CombatDeclareBlockers,
CombatFirstStrikeDamage,
CombatDamage,
CombatEnd,
Main2,
EndOfTurn,
Cleanup,
}Expand description
Turn phases/steps. Mirrors Java PhaseType.
Variants§
Untap
Upkeep
Draw
Main1
CombatBegin
CombatDeclareAttackers
CombatDeclareBlockers
CombatFirstStrikeDamage
CombatDamage
CombatEnd
Main2
EndOfTurn
Cleanup
Implementations§
Source§impl PhaseType
impl PhaseType
Sourcepub const TURN_ORDER: [PhaseType; 13]
pub const TURN_ORDER: [PhaseType; 13]
The full turn sequence in order.
Sourcepub const BEGINNING_PHASE: [PhaseType; 3]
pub const BEGINNING_PHASE: [PhaseType; 3]
Phase groups for grouping related steps.
pub const COMBAT_PHASE: [PhaseType; 6]
pub fn is_main(self) -> bool
pub fn is_combat(self) -> bool
Sourcepub fn next(self) -> PhaseType
pub fn next(self) -> PhaseType
Get the next phase in the turn sequence. Wraps from Cleanup -> Untap.
pub fn is_before(self, other: PhaseType) -> bool
pub fn is_after(self, other: PhaseType) -> bool
Sourcepub fn from_step_string(s: &str) -> Option<PhaseType>
pub fn from_step_string(s: &str) -> Option<PhaseType>
Parse a frontend step string (e.g. “main1”, “declare_attackers”) to PhaseType.
Sourcepub fn script_name(self) -> &'static str
pub fn script_name(self) -> &'static str
Script-compatible name used in card definition files.
pub fn from_script_name(s: &str) -> Option<PhaseType>
pub fn parse_range(values: &str) -> Vec<PhaseType>
Trait Implementations§
impl Copy for PhaseType
Source§impl<'de> Deserialize<'de> for PhaseType
impl<'de> Deserialize<'de> for PhaseType
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<PhaseType, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<PhaseType, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for PhaseType
Source§impl From<PhaseType> for AbilityValue
impl From<PhaseType> for AbilityValue
Source§impl Serialize for PhaseType
impl Serialize for PhaseType
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl StructuralPartialEq for PhaseType
Auto Trait Implementations§
impl Freeze for PhaseType
impl RefUnwindSafe for PhaseType
impl Send for PhaseType
impl Sync for PhaseType
impl Unpin for PhaseType
impl UnsafeUnpin for PhaseType
impl UnwindSafe for PhaseType
Blanket Implementations§
Source§impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
Source§type ArchivedMetadata = ()
type ArchivedMetadata = ()
The archived version of the pointer metadata for this type.
Source§fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata,
) -> <T as Pointee>::Metadata
fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata, ) -> <T as Pointee>::Metadata
Converts some archived metadata to the pointer metadata for itself.
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CallHasher for T
impl<T> CallHasher for T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<F, W, T, D> Deserialize<With<T, W>, D> for F
impl<F, W, T, D> Deserialize<With<T, W>, D> for F
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.Source§impl<T> LayoutRaw for T
impl<T> LayoutRaw for T
Source§fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
Gets the layout of the type.