pub trait MapUnit {
type Id: Copy + PartialEq;
// Required methods
fn id(&self) -> Self::Id;
fn pos(&self) -> Pos;
fn text(&self) -> String;
}Expand description
What a scene needs of a game’s view of a unit: which unit it is, the tile it is shown on, and its line in the scene’s text.
Required Associated Types§
Required Methods§
Sourcefn text(&self) -> String
fn text(&self) -> String
Its line in MapScene::to_text: everything about it a test or a
bug report needs, the same for the same unit.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".