Trait SlotType

Source
pub trait SlotType {
    // Required method
    fn can_insert_into(&self, item_type: &Self) -> bool;
}
Expand description

A trait defining which items can be inserted into each inventory slot type.

Required Methods§

Source

fn can_insert_into(&self, item_type: &Self) -> bool

Checks if the provided item type can be inserted in this slot type.

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.

Implementations on Foreign Types§

Source§

impl SlotType for ()

Source§

fn can_insert_into(&self, _: &Self) -> bool

Implementors§