pub trait Terrains {
// Required methods
fn name(&self, id: TerrainId) -> Option<&str>;
fn glyphs(&self, id: TerrainId) -> Option<TerrainGlyphs<'_>>;
}Expand description
A game’s terrains, as far as its map’s look goes: what each is called,
and how the glyph skin draws it. The game’s table, by TerrainId.
Required Methods§
Sourcefn name(&self, id: TerrainId) -> Option<&str>
fn name(&self, id: TerrainId) -> Option<&str>
The name of terrain id ("water"), if the game has it.
Sourcefn glyphs(&self, id: TerrainId) -> Option<TerrainGlyphs<'_>>
fn glyphs(&self, id: TerrainId) -> Option<TerrainGlyphs<'_>>
How the glyph skin draws terrain id, if the game has it.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".