Trait Compare

Source
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§

Source

fn plant(other: Self::Type) -> Effectiveness

Source

fn rock(other: Self::Type) -> Effectiveness

Rock Effectiveness against a target

Source

fn water(other: Self::Type) -> Effectiveness

Water Effectiveness against a target

Source

fn fire(other: Self::Type) -> Effectiveness

Fire Effectiveness against a target

Source

fn electric(other: Self::Type) -> Effectiveness

Electric Effectiveness against a target

Source

fn spirit(other: Self::Type) -> Effectiveness

Spirit Effectiveness against a target

Source

fn light(other: Self::Type) -> Effectiveness

Light Effectiveness against a target

Source

fn wind(other: Self::Type) -> Effectiveness

Wind Effectiveness against a target

Source

fn none(other: Self::Type) -> Effectiveness

None Effectiveness against a target

Source

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.

Implementors§