Skip to main content

Terrains

Trait Terrains 

Source
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§

Source

fn name(&self, id: TerrainId) -> Option<&str>

The name of terrain id ("water"), if the game has it.

Source

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".

Implementors§