[−][src]Struct console::Style
A stored style that can be applied.
Methods
impl Style
[src]
impl Style
pub fn new() -> Style | [src] |
Returns an empty default style.
pub fn from_dotted_str(s: &str) -> Style | [src] |
Creates a style from a dotted string.
Effectively the string is split at each dot and then the
terms in between are applied. For instance red.on_blue
will
create a string that is red on blue background. Unknown terms
are ignored.
pub fn apply_to<D>(&self, val: D) -> StyledObject<D> | [src] |
Apply the style to something that can be displayed.
pub fn force_styling(self, value: bool) -> Style | [src] |
Forces styling on or off.
This overrides the detection from clicolors-control
.
pub fn fg(self, color: Color) -> Style | [src] |
Sets a foreground color.
pub fn bg(self, color: Color) -> Style | [src] |
Sets a background color.
pub fn attr(self, attr: Attribute) -> Style | [src] |
Adds a attr.
pub fn black(self) -> Style | [src] |
pub fn red(self) -> Style | [src] |
pub fn green(self) -> Style | [src] |
pub fn yellow(self) -> Style | [src] |
pub fn blue(self) -> Style | [src] |
pub fn magenta(self) -> Style | [src] |
pub fn cyan(self) -> Style | [src] |
pub fn white(self) -> Style | [src] |
pub fn on_black(self) -> Style | [src] |
pub fn on_red(self) -> Style | [src] |
pub fn on_green(self) -> Style | [src] |
pub fn on_yellow(self) -> Style | [src] |
pub fn on_blue(self) -> Style | [src] |
pub fn on_magenta(self) -> Style | [src] |
pub fn on_cyan(self) -> Style | [src] |
pub fn on_white(self) -> Style | [src] |
pub fn bold(self) -> Style | [src] |
pub fn dim(self) -> Style | [src] |
pub fn italic(self) -> Style | [src] |
pub fn underlined(self) -> Style | [src] |
pub fn blink(self) -> Style | [src] |
pub fn reverse(self) -> Style | [src] |
Trait Implementations
impl PartialEq<Style> for Style
[src]
impl PartialEq<Style> for Style
impl Eq for Style
[src]
impl Eq for Style
impl Clone for Style
[src]
impl Clone for Style
fn clone(&self) -> Style | [src] |
fn clone_from(&mut self, source: &Self) | 1.0.0 [src] |
Performs copy-assignment from source
. Read more
impl Default for Style
[src]
impl Default for Style
impl Debug for Style
[src]
impl Debug for Style
Auto Trait Implementations
Blanket Implementations
impl<T, U> Into for T where
U: From<T>,
[src]
impl<T, U> Into for T where
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
impl<T> ToOwned for T where
T: Clone,
impl<T> From for T
[src]
impl<T> From for T
impl<T, U> TryFrom for T where
T: From<U>,
[src]
impl<T, U> TryFrom for T where
T: From<U>,
type Error = !
🔬 This is a nightly-only experimental API. (
try_from
)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> Borrow for T where
T: ?Sized,
[src]
impl<T> Borrow for T where
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
impl<T> Any for T where
T: 'static + ?Sized,
fn get_type_id(&self) -> TypeId | [src] |
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
impl<T, U> TryInto for T where
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
🔬 This is a nightly-only experimental API. (
try_from
)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 for T where
T: ?Sized,
[src]
impl<T> BorrowMut for T where
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T | [src] |
impl<T> Erased for T
impl<T> Erased for T