[][src]Struct termimad::StyledChar

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.

Methods

impl StyledChar[src]

pub fn new(compound_style: CompoundStyle, 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 set_fg(&mut self, color: Color)[src]

Change the fg color, keeping the char, bg color and attributes

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) -> StyledObject<String>[src]

Return a struct implementing Display, made of a (optimized) repetition of the character with its style.

Trait Implementations

impl Display for StyledChar[src]

Auto Trait Implementations

Blanket Implementations

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> From<T> for T[src]

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]