[−][src]Struct termimad::StyledChar
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 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]
fn clone(&self) -> StyledChar[src]
pub fn clone_from(&mut self, source: &Self)1.0.0[src]
impl Debug for StyledChar[src]
impl Display for StyledChar[src]
Auto Trait Implementations
impl RefUnwindSafe for StyledChar[src]
impl Send for StyledChar[src]
impl Sync for StyledChar[src]
impl Unpin for StyledChar[src]
impl UnwindSafe for StyledChar[src]
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized, [src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T[src]
impl<T> From<T> for T[src]
impl<T, U> Into<U> for T where
U: From<T>, [src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone, [src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T[src]
pub fn clone_into(&self, target: &mut T)[src]
impl<T> ToString for T where
T: Display + ?Sized, [src]
T: Display + ?Sized,
impl<T, U> TryFrom<U> for T where
U: Into<T>, [src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>, [src]
U: TryFrom<T>,