pub trait SpellApiBased {
// Required methods
fn api_type(&self) -> &str;
fn resolve(&self, sa: &SpellAbility);
// Provided method
fn is_intrinsic(&self) -> bool { ... }
}Expand description
Marker trait for API-based spell abilities.
In Java, SpellApiBased extends Spell and holds a reference to
SpellAbilityEffect. In Rust the dispatch is centralized in
effect_dispatch!, so this provides structural parity.
Required Methods§
Sourcefn resolve(&self, sa: &SpellAbility)
fn resolve(&self, sa: &SpellAbility)
Resolve this spell by dispatching to the effect system.
Provided Methods§
Sourcefn is_intrinsic(&self) -> bool
fn is_intrinsic(&self) -> bool
Whether this spell is intrinsic to its card.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".