Trait GameObjectDerived

Source
pub trait GameObjectDerived: Sized {
    // Required methods
    fn get_name(&self) -> Rc<str>;
    fn get_references<E: From<EntityRef>, C: Extend<E>>(
        &self,
        collection: &mut C,
    );
}
Expand description

A trait for objects that can be created from a GameObjectMap. Currently these include: Character, Culture, Dynasty, Faith, Memory, Player, Title. The idea is to have uniform interface for the object initialization.

Required Methods§

Source

fn get_name(&self) -> Rc<str>

Get the name of the object. The result of this method depends on the type.

Source

fn get_references<E: From<EntityRef>, C: Extend<E>>(&self, collection: &mut C)

Extends the provided collection with references to other GameObjectDerived objects, if any.

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§