Accessible

Trait Accessible 

Source
pub trait Accessible {
    // Required method
    fn get_val(&self, key: &str) -> Option<Box<dyn GameStat>>;
}
Expand description

Trait for objects that can expose a stat via a string key. The trait returns a boxed trait object so callers do not need to know the concrete type that was stored.

Required Methods§

Source

fn get_val(&self, key: &str) -> Option<Box<dyn GameStat>>

Return the requested stat as a Box<dyn GameStat>. None if the key does not exist.

Implementors§