[][src]Trait monstermaker_core::Name

pub trait Name {
    fn name(&self) -> &str;
}

A named type.

A type can implement this trait to provide a name, possibly defined internally in the type. For example:

use monstermaker_core::Name;

struct Foo {
    name: &'static str,
}

impl Name for Foo {
    fn name(&self) -> &str {
        self.name
    }
}

Required methods

fn name(&self) -> &str

Returns the object's name.

Loading content...

Implementors

Loading content...