Struct termgame::StyledCharacter
source · pub struct StyledCharacter {
pub c: char,
pub style: Option<Style>,
}
Expand description
A character with a given style.
use termgame::{StyledCharacter, GameStyle, GameColor};
StyledCharacter::new('x')
.style(GameStyle::new().background_color(Some(GameColor::Black)));
Fields§
§c: char
This is the actual character that will be displayed on screen.
style: Option<Style>
This is the Style
that will be used when displaying on screen.
Implementations§
Trait Implementations§
source§impl Clone for StyledCharacter
impl Clone for StyledCharacter
source§fn clone(&self) -> StyledCharacter
fn clone(&self) -> StyledCharacter
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for StyledCharacter
impl Debug for StyledCharacter
source§impl From<char> for StyledCharacter
impl From<char> for StyledCharacter
source§impl PartialEq<StyledCharacter> for StyledCharacter
impl PartialEq<StyledCharacter> for StyledCharacter
source§fn eq(&self, other: &StyledCharacter) -> bool
fn eq(&self, other: &StyledCharacter) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.