Struct owo_colors::styles::StrikeThroughDisplay [−][src]
#[repr(transparent)]pub struct StrikeThroughDisplay<'a, T>(pub &'a T);
Expand description
Transparent wrapper around a type which implements all the formatters the wrapped type does,
with the addition of crossing out the given text. Recommended to be constructed using
OwoColorize
.
Tuple Fields
0: &'a T
Trait Implementations
Auto Trait Implementations
impl<'a, T> RefUnwindSafe for StrikeThroughDisplay<'a, T> where
T: RefUnwindSafe,
impl<'a, T> Send for StrikeThroughDisplay<'a, T> where
T: Sync,
impl<'a, T> Sync for StrikeThroughDisplay<'a, T> where
T: Sync,
impl<'a, T> Unpin for StrikeThroughDisplay<'a, T>
impl<'a, T> UnwindSafe for StrikeThroughDisplay<'a, T> where
T: RefUnwindSafe,
Blanket Implementations
Mutably borrows from an owned value. Read more
Set the foreground color generically Read more
Set the background color generically. Read more
Change the foreground color to black
Change the foreground color to black
Change the foreground color to red
Change the foreground color to red
Change the foreground color to green
Change the foreground color to green
Change the foreground color to yellow
Change the foreground color to yellow
Change the foreground color to blue
Change the foreground color to blue
Change the foreground color to magenta
Change the foreground color to magenta
Change the foreground color to purple
Change the foreground color to purple
Change the foreground color to cyan
Change the foreground color to cyan
Change the foreground color to white
Change the foreground color to white
Change the foreground color to bright black
Change the foreground color to bright black
Change the foreground color to bright red
Change the foreground color to bright red
Change the foreground color to bright green
Change the foreground color to bright green
Change the foreground color to bright yellow
Change the foreground color to bright yellow
Change the foreground color to bright blue
Change the foreground color to bright blue
Change the foreground color to bright magenta
Change the foreground color to bright magenta
Change the foreground color to bright purple
Change the foreground color to bright purple
Change the foreground color to bright cyan
Change the foreground color to bright cyan
Change the foreground color to bright white
Change the foreground color to bright white
Make the text bold
Make the text dim
Make the text italicized
Make the text italicized
Make the text blink
Make the text blink (but fast!)
Swap the foreground and background colors
Hide the text
Cross out the text
Set the foreground color at runtime. Only use if you do not know which color will be used at
compile-time. If the color is constant, use either OwoColorize::fg
or
a color-specific method, such as OwoColorize::green
, Read more
Set the background color at runtime. Only use if you do not know what color to use at
compile-time. If the color is constant, use either OwoColorize::bg
or
a color-specific method, such as OwoColorize::on_yellow
, Read more
fn fg_rgb<const R: u8, const G: u8, const B: u8>(
&self
) -> FgColorDisplay<'_, CustomColor<R, G, B>, Self>
fn fg_rgb<const R: u8, const G: u8, const B: u8>(
&self
) -> FgColorDisplay<'_, CustomColor<R, G, B>, Self>
Set the foreground color to a specific RGB value.
fn bg_rgb<const R: u8, const G: u8, const B: u8>(
&self
) -> BgColorDisplay<'_, CustomColor<R, G, B>, Self>
fn bg_rgb<const R: u8, const G: u8, const B: u8>(
&self
) -> BgColorDisplay<'_, CustomColor<R, G, B>, Self>
Set the background color to a specific RGB value.
Sets the foreground color to an RGB value.
Sets the background color to an RGB value.
fn if_stdout_tty<'a, Out, ApplyFn>(
&'a self,
apply: ApplyFn
) -> TtyDisplay<'a, StdOut, Self, Out, ApplyFn> where
ApplyFn: Fn(&'a Self) -> Out,
fn if_stdout_tty<'a, Out, ApplyFn>(
&'a self,
apply: ApplyFn
) -> TtyDisplay<'a, StdOut, Self, Out, ApplyFn> where
ApplyFn: Fn(&'a Self) -> Out,
if_stdout_tty is superseded by if_supports_color
Apply a given transformation function to all formatters if stdout is a tty console allowing you to conditionally apply given styles/colors. Read more
fn if_stderr_tty<'a, Out, ApplyFn>(
&'a self,
apply: ApplyFn
) -> TtyDisplay<'a, StdErr, Self, Out, ApplyFn> where
ApplyFn: Fn(&'a Self) -> Out,
fn if_stderr_tty<'a, Out, ApplyFn>(
&'a self,
apply: ApplyFn
) -> TtyDisplay<'a, StdErr, Self, Out, ApplyFn> where
ApplyFn: Fn(&'a Self) -> Out,
if_stderr_tty is superseded by if_supports_color
Apply a given transformation function to all formatters if stderr is a tty console allowing you to conditionally apply given styles/colors. Read more
fn if_supports_color<'a, Out, ApplyFn>(
&'a self,
stream: Stream,
apply: ApplyFn
) -> SupportsColorsDisplay<'a, Self, Out, ApplyFn> where
ApplyFn: Fn(&'a Self) -> Out,
fn if_supports_color<'a, Out, ApplyFn>(
&'a self,
stream: Stream,
apply: ApplyFn
) -> SupportsColorsDisplay<'a, Self, Out, ApplyFn> where
ApplyFn: Fn(&'a Self) -> Out,
Apply a given transformation function to all formatters if the given stream supports at least basic ANSI colors, allowing you to conditionally apply given styles/colors. Read more