pub struct TriggerReplacementBase {
pub card_trait_base: CardTraitBase,
pub valid_host_zones: Option<Vec<ZoneType>>,
pub overriding_ability: Option<SpellAbility>,
}Expand description
Port of Java TriggerReplacementBase.
Java:
public abstract class TriggerReplacementBase extends CardTraitBase implements IIdentifiable, Cloneable
Fields§
§card_trait_base: CardTraitBase§valid_host_zones: Option<Vec<ZoneType>>§overriding_ability: Option<SpellAbility>Implementations§
Source§impl TriggerReplacementBase
impl TriggerReplacementBase
pub fn set_host_card_id(&mut self, id: CardId)
pub fn set_keyword(&mut self, kw: KeywordInterface)
pub fn set_card_state(&mut self, state: CardState)
pub fn get_active_zone(&self) -> Option<&[ZoneType]>
pub fn set_active_zone(&mut self, zones: Vec<ZoneType>)
pub fn zones_check( &self, game: &GameState, host_card_zone: Option<ZoneType>, ) -> bool
pub fn get_overriding_ability(&self) -> Option<&SpellAbility>
pub fn set_overriding_ability(&mut self, overriding_ability: SpellAbility)
Sourcepub fn ensure_ability(&mut self) -> Option<&mut SpellAbility>
pub fn ensure_ability(&mut self) -> Option<&mut SpellAbility>
Port of Java ensureAbility().
The Java base type is abstract and concrete trigger/replacement classes
may lazily populate the overriding ability. In the current Rust port,
the base owns the resolved ability directly, so ensure_ability
returns the stored ability when present.
pub fn change_text(&mut self)
pub fn change_text_intrinsic( &mut self, color_map: HashMap<String, String>, type_map: HashMap<String, String>, )
Trait Implementations§
Source§impl Clone for TriggerReplacementBase
impl Clone for TriggerReplacementBase
Source§fn clone(&self) -> TriggerReplacementBase
fn clone(&self) -> TriggerReplacementBase
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for TriggerReplacementBase
impl Debug for TriggerReplacementBase
Source§impl Default for TriggerReplacementBase
impl Default for TriggerReplacementBase
Source§fn default() -> TriggerReplacementBase
fn default() -> TriggerReplacementBase
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for TriggerReplacementBase
impl<'de> Deserialize<'de> for TriggerReplacementBase
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl !RefUnwindSafe for TriggerReplacementBase
impl !UnwindSafe for TriggerReplacementBase
impl Freeze for TriggerReplacementBase
impl Send for TriggerReplacementBase
impl Sync for TriggerReplacementBase
impl Unpin for TriggerReplacementBase
impl UnsafeUnpin for TriggerReplacementBase
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> 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<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.