pub struct CardTraitChanges {
pub abilities: Vec<SpellAbility>,
pub removed_abilities: Vec<SpellAbility>,
pub triggers: Vec<Trigger>,
pub replacements: Vec<ReplacementEffect>,
pub static_abilities: Vec<StaticAbility>,
pub remove_all: bool,
}Fields§
§abilities: Vec<SpellAbility>§removed_abilities: Vec<SpellAbility>§triggers: Vec<Trigger>§replacements: Vec<ReplacementEffect>§static_abilities: Vec<StaticAbility>§remove_all: boolJava parity subset for predicate removal: true means remove all existing card traits before applying additions (used by addChangedCardTraitsByText).
Implementations§
Source§impl CardTraitChanges
impl CardTraitChanges
pub fn remove_all_layer( abilities: Vec<SpellAbility>, triggers: Vec<Trigger>, replacements: Vec<ReplacementEffect>, static_abilities: Vec<StaticAbility>, ) -> Self
Sourcepub fn contains_cost_change(&self) -> bool
pub fn contains_cost_change(&self) -> bool
Return true when any injected static ability changes casting cost.
Sourcepub fn copy(&self, _host: CardId, _lki: bool) -> Self
pub fn copy(&self, _host: CardId, _lki: bool) -> Self
Java-parity copy hook. Host/LKI-specific rewrites are not yet modeled in Rust, so this clones.
Sourcepub fn change_text(&mut self)
pub fn change_text(&mut self)
Java-parity text-rewrite hook. Normalizes mutable text payloads carried by trait changes.
pub fn apply_spell_ability(&self, list: Vec<SpellAbility>) -> Vec<SpellAbility>
pub fn apply_trigger(&self, list: Vec<Trigger>) -> Vec<Trigger>
pub fn apply_replacement_effect( &self, list: Vec<ReplacementEffect>, ) -> Vec<ReplacementEffect>
pub fn apply_static_ability( &self, list: Vec<StaticAbility>, ) -> Vec<StaticAbility>
Trait Implementations§
Source§impl CardTraitChanges for CardTraitChanges
impl CardTraitChanges for CardTraitChanges
fn apply_spell_ability(&self, list: Vec<SpellAbility>) -> Vec<SpellAbility>
fn apply_trigger(&self, list: Vec<Trigger>) -> Vec<Trigger>
fn apply_replacement_effect( &self, list: Vec<ReplacementEffect>, ) -> Vec<ReplacementEffect>
fn apply_static_ability(&self, list: Vec<StaticAbility>) -> Vec<StaticAbility>
fn change_text(&mut self)
fn copy(&self, host: CardId, lki: bool) -> Box<dyn CardTraitChanges>
Source§impl Clone for CardTraitChanges
impl Clone for CardTraitChanges
Source§fn clone(&self) -> CardTraitChanges
fn clone(&self) -> CardTraitChanges
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 CardTraitChanges
impl Debug for CardTraitChanges
Source§impl Default for CardTraitChanges
impl Default for CardTraitChanges
Source§fn default() -> CardTraitChanges
fn default() -> CardTraitChanges
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for CardTraitChanges
impl<'de> Deserialize<'de> for CardTraitChanges
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 CardTraitChanges
impl !UnwindSafe for CardTraitChanges
impl Freeze for CardTraitChanges
impl Send for CardTraitChanges
impl Sync for CardTraitChanges
impl Unpin for CardTraitChanges
impl UnsafeUnpin for CardTraitChanges
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.