Unit

Trait Unit 

Source
pub trait Unit: Sized {
    // Required method
    fn attack(
        &mut self,
        enemy: &mut Self,
        atk_weapon: dyn Weapon<Self>,
        def_weapon: dyn Weapon<Self>,
        atk_item: dyn Item<Self>,
        def_item: dyn Item<Self>,
    );
}
Expand description

A unit in Fire Emblem that can attack and defend.

Required Methods§

Source

fn attack( &mut self, enemy: &mut Self, atk_weapon: dyn Weapon<Self>, def_weapon: dyn Weapon<Self>, atk_item: dyn Item<Self>, def_item: dyn Item<Self>, )

Attacks the target with the given weapon, updating both this unit and the 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§