#[non_exhaustive]pub struct TerrainGlyphs<'a> {
pub glyphs: [char; 2],
pub fg: &'a str,
pub bg: &'a str,
}Expand description
How the glyph skin draws one terrain: its two glyphs, in the palette’s
colors of these names. Build it with TerrainGlyphs::new: a struct
literal doesn’t compile outside this crate, so a new field never breaks
a game (ADR-0039).
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.glyphs: [char; 2]The tile’s two glyphs, left then right.
fg: &'a strThe palette’s name of the glyphs’ color.
bg: &'a strThe palette’s name of the tile’s background.
Implementations§
Trait Implementations§
Source§impl<'a> Clone for TerrainGlyphs<'a>
impl<'a> Clone for TerrainGlyphs<'a>
Source§fn clone(&self) -> TerrainGlyphs<'a>
fn clone(&self) -> TerrainGlyphs<'a>
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl<'a> Copy for TerrainGlyphs<'a>
Source§impl<'a> Debug for TerrainGlyphs<'a>
impl<'a> Debug for TerrainGlyphs<'a>
impl<'a> Eq for TerrainGlyphs<'a>
Source§impl<'a> PartialEq for TerrainGlyphs<'a>
impl<'a> PartialEq for TerrainGlyphs<'a>
impl<'a> StructuralPartialEq for TerrainGlyphs<'a>
Auto Trait Implementations§
impl<'a> Freeze for TerrainGlyphs<'a>
impl<'a> RefUnwindSafe for TerrainGlyphs<'a>
impl<'a> Send for TerrainGlyphs<'a>
impl<'a> Sync for TerrainGlyphs<'a>
impl<'a> Unpin for TerrainGlyphs<'a>
impl<'a> UnsafeUnpin for TerrainGlyphs<'a>
impl<'a> UnwindSafe for TerrainGlyphs<'a>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more