Struct termimad::StyledChar [−][src]
pub struct StyledChar { /* fields omitted */ }
A modifiable character which can be easily written or repeated. Can be used for bullets, horizontal rules or quote marks.
Implementations
impl StyledChar
[src]
impl StyledChar
[src]pub fn new(compound_style: CompoundStyle, nude_char: char) -> StyledChar
[src]
pub fn nude(nude_char: char) -> StyledChar
[src]
pub fn from_fg_char(fg: Color, nude_char: char) -> StyledChar
[src]
pub fn set_char(&mut self, nude_char: char)
[src]
Change the char, keeping colors and attributes
pub fn get_char(&self) -> char
[src]
pub fn set_fg(&mut self, color: Color)
[src]
Change the fg color, keeping the char, bg color and attributes
pub fn get_fg(&self) -> Option<Color>
[src]
pub fn set_bg(&mut self, color: Color)
[src]
Change the bg color, keeping the char, fg color and attributes
pub fn get_bg(&self) -> Option<Color>
[src]
pub fn set_compound_style(&mut self, compound_style: CompoundStyle)
[src]
Change the style (colors, attributes) of the styled char
pub fn repeated(&self, count: usize) -> StyledContent<String>
[src]
Return a struct implementing Display
, made of a (optimized) repetition
of the character with its style.
pub fn queue_repeat<W>(&self, w: &mut W, count: usize) -> Result<()> where
W: Write,
[src]
W: Write,
pub fn queue<W>(&self, w: &mut W) -> Result<()> where
W: Write,
[src]
W: Write,
Trait Implementations
impl Clone for StyledChar
[src]
impl Clone for StyledChar
[src]fn clone(&self) -> StyledChar
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
Auto Trait Implementations
impl RefUnwindSafe for StyledChar
impl RefUnwindSafe for StyledChar
impl Send for StyledChar
impl Send for StyledChar
impl Sync for StyledChar
impl Sync for StyledChar
impl Unpin for StyledChar
impl Unpin for StyledChar
impl UnwindSafe for StyledChar
impl UnwindSafe for StyledChar