Struct StyledObject
pub struct StyledObject<D> { /* private fields */ }
A formatting wrapper that can be styled for a terminal.
Implementations
impl<D> StyledObject<D>
fn force_styling(self, value: bool) -> StyledObject<D>Forces styling on or off.
This overrides the automatic detection.
fn for_stderr(self) -> StyledObject<D>Specifies that style is applying to something being written on stderr
const fn for_stdout(self) -> StyledObject<D>Specifies that style is applying to something being written on stdout
This is the default
const fn fg(self, color: Color) -> StyledObject<D>Sets a foreground color.
const fn bg(self, color: Color) -> StyledObject<D>Sets a background color.
const fn attr(self, attr: Attribute) -> StyledObject<D>Adds a attr.
const fn black(self) -> StyledObject<D>const fn red(self) -> StyledObject<D>const fn green(self) -> StyledObject<D>const fn yellow(self) -> StyledObject<D>const fn blue(self) -> StyledObject<D>const fn magenta(self) -> StyledObject<D>const fn cyan(self) -> StyledObject<D>const fn white(self) -> StyledObject<D>const fn color256(self, color: u8) -> StyledObject<D>const fn true_color(self, r: u8, g: u8, b: u8) -> StyledObject<D>const fn bright(self) -> StyledObject<D>const fn on_black(self) -> StyledObject<D>const fn on_red(self) -> StyledObject<D>const fn on_green(self) -> StyledObject<D>const fn on_yellow(self) -> StyledObject<D>const fn on_blue(self) -> StyledObject<D>const fn on_magenta(self) -> StyledObject<D>const fn on_cyan(self) -> StyledObject<D>const fn on_white(self) -> StyledObject<D>const fn on_color256(self, color: u8) -> StyledObject<D>const fn on_true_color(self, r: u8, g: u8, b: u8) -> StyledObject<D>const fn on_bright(self) -> StyledObject<D>const fn bold(self) -> StyledObject<D>const fn dim(self) -> StyledObject<D>const fn italic(self) -> StyledObject<D>const fn underlined(self) -> StyledObject<D>const fn blink(self) -> StyledObject<D>const fn blink_fast(self) -> StyledObject<D>const fn reverse(self) -> StyledObject<D>const fn strikethrough(self) -> StyledObject<D>
Trait Implementations
impl<D: Binary> Binary for StyledObject<D>
fn fmt(&self, f: &mut Formatter<'_>) -> Result
impl<D: Clone> Clone for StyledObject<D>
fn clone(&self) -> Self
impl<D: Debug> Debug for StyledObject<D>
fn fmt(&self, f: &mut Formatter<'_>) -> Result
impl<D: Display> Display for StyledObject<D>
fn fmt(&self, f: &mut Formatter<'_>) -> Result
impl<D: LowerExp> LowerExp for StyledObject<D>
fn fmt(&self, f: &mut Formatter<'_>) -> Result
impl<D: LowerHex> LowerHex for StyledObject<D>
fn fmt(&self, f: &mut Formatter<'_>) -> Result
impl<D: Octal> Octal for StyledObject<D>
fn fmt(&self, f: &mut Formatter<'_>) -> Result
impl<D: Pointer> Pointer for StyledObject<D>
fn fmt(&self, f: &mut Formatter<'_>) -> Result
impl<D: UpperExp> UpperExp for StyledObject<D>
fn fmt(&self, f: &mut Formatter<'_>) -> Result
impl<D: UpperHex> UpperHex for StyledObject<D>
fn fmt(&self, f: &mut Formatter<'_>) -> Result