[−][src]Struct termimad::CompoundStyle
A style which may be applied to a compound
Fields
object_style: ObjectStyle
Methods
impl CompoundStyle
[src]
pub fn apply_to<D: Display>(&self, val: D) -> StyledObject<D>
[src]
Apply an StyledObject
to the passed displayable object.
pub fn new(
fg_color: Option<Color>,
bg_color: Option<Color>,
attrs: Vec<Attribute>
) -> CompoundStyle
[src]
fg_color: Option<Color>,
bg_color: Option<Color>,
attrs: Vec<Attribute>
) -> CompoundStyle
Get an new instance of CompoundStyle
pub fn with_fgbg(fg: Color, bg: Color) -> CompoundStyle
[src]
Get an new instance of CompoundStyle
pub fn with_fg(fg: Color) -> CompoundStyle
[src]
Get an new instance of CompoundStyle
pub fn with_bg(bg: Color) -> CompoundStyle
[src]
Get an new instance of CompoundStyle
pub fn with_attr(attr: Attribute) -> CompoundStyle
[src]
Get an new instance of CompoundStyle
pub fn set_fg(&mut self, color: Color)
[src]
Set the foreground color to the passed color.
pub fn set_bg(&mut self, color: Color)
[src]
Set the background color to the passed color.
pub fn set_fgbg(&mut self, fg: Color, bg: Color)
[src]
Set the colors to the passed ones
pub fn add_attr(&mut self, attr: Attribute)
[src]
Add an Attribute
. Like italic, underlined or bold.
pub fn overwrite_with(&mut self, other: &CompoundStyle)
[src]
Add the defined characteristics of other
to self, overwriting
its own one when defined
pub fn repeat_string(&self, f: &mut Formatter, s: &str, count: usize) -> Result
[src]
Write a string several times with the line compound style
Implementation Note: performances here are critical
pub fn repeat_space(&self, f: &mut Formatter, count: usize) -> Result
[src]
Write 0 or more spaces with the line's compound style
Trait Implementations
impl Clone for CompoundStyle
[src]
fn clone(&self) -> CompoundStyle
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl Default for CompoundStyle
[src]
fn default() -> CompoundStyle
[src]
impl From<ObjectStyle> for CompoundStyle
[src]
fn from(object_style: ObjectStyle) -> CompoundStyle
[src]
Auto Trait Implementations
impl Sync for CompoundStyle
impl Send for CompoundStyle
impl Unpin for CompoundStyle
impl RefUnwindSafe for CompoundStyle
impl UnwindSafe for CompoundStyle
Blanket Implementations
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &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, 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.
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>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,