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]

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]

pub fn queue<W>(&self, w: &mut W) -> Result<()> where
    W: Write
[src]

Trait Implementations

impl Clone for StyledChar[src]

impl Debug for StyledChar[src]

impl Display for StyledChar[src]

Auto Trait Implementations

Blanket Implementations

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

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

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

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

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

impl<T> Pointable for T

type Init = T

The type for initializers.

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

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.