pub trait Compare {
type Type;
// Required methods
fn plant(other: Self::Type) -> Effectiveness;
fn rock(other: Self::Type) -> Effectiveness;
fn water(other: Self::Type) -> Effectiveness;
fn fire(other: Self::Type) -> Effectiveness;
fn electric(other: Self::Type) -> Effectiveness;
fn spirit(other: Self::Type) -> Effectiveness;
fn light(other: Self::Type) -> Effectiveness;
fn wind(other: Self::Type) -> Effectiveness;
fn none(other: Self::Type) -> Effectiveness;
fn effectiveness(&self, other: Self::Type) -> Effectiveness;
}
Required Associated Types§
Required Methods§
fn plant(other: Self::Type) -> Effectiveness
Sourcefn rock(other: Self::Type) -> Effectiveness
fn rock(other: Self::Type) -> Effectiveness
Rock Effectiveness against a target
Sourcefn water(other: Self::Type) -> Effectiveness
fn water(other: Self::Type) -> Effectiveness
Water Effectiveness against a target
Sourcefn fire(other: Self::Type) -> Effectiveness
fn fire(other: Self::Type) -> Effectiveness
Fire Effectiveness against a target
Sourcefn electric(other: Self::Type) -> Effectiveness
fn electric(other: Self::Type) -> Effectiveness
Electric Effectiveness against a target
Sourcefn spirit(other: Self::Type) -> Effectiveness
fn spirit(other: Self::Type) -> Effectiveness
Spirit Effectiveness against a target
Sourcefn light(other: Self::Type) -> Effectiveness
fn light(other: Self::Type) -> Effectiveness
Light Effectiveness against a target
Sourcefn wind(other: Self::Type) -> Effectiveness
fn wind(other: Self::Type) -> Effectiveness
Wind Effectiveness against a target
Sourcefn none(other: Self::Type) -> Effectiveness
fn none(other: Self::Type) -> Effectiveness
None Effectiveness against a target
Sourcefn effectiveness(&self, other: Self::Type) -> Effectiveness
fn effectiveness(&self, other: Self::Type) -> Effectiveness
Effectiveness against a target
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.