Trait SlotKey

Source
pub trait SlotKey<C, I>: Copy {
    type ImageKey: PartialEq + Send + 'static;

    // Required methods
    fn image_key(&self, source: &C) -> Option<(Self::ImageKey, Option<Color>)>;
    fn amount(&self, source: &C) -> Option<u32>;
    fn image_ids(key: &Self::ImageKey, source: &I) -> Vec<Id>;
}

Required Associated Types§

Source

type ImageKey: PartialEq + Send + 'static

Required Methods§

Source

fn image_key(&self, source: &C) -> Option<(Self::ImageKey, Option<Color>)>

Returns an Option since the slot could be empty

Source

fn amount(&self, source: &C) -> Option<u32>

Source

fn image_ids(key: &Self::ImageKey, source: &I) -> Vec<Id>

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§