Struct console::Style [−][src]
pub struct Style { /* fields omitted */ }
Expand description
A stored style that can be applied.
Implementations
impl Style
[src]
impl Style
[src]pub fn from_dotted_str(s: &str) -> Style
[src]
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]
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]
pub fn force_styling(self, value: bool) -> Style
[src]Forces styling on or off.
This overrides the detection from clicolors-control
.
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]
pub fn hidden(self) -> Style
[src]
Trait Implementations
impl Eq for Style
[src]
impl StructuralEq for Style
[src]
impl StructuralPartialEq for Style
[src]
Auto Trait Implementations
impl RefUnwindSafe for Style
impl Send for Style
impl Sync for Style
impl Unpin for Style
impl UnwindSafe for Style
Blanket Implementations
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]pub fn borrow_mut(&mut self) -> &mut T
[src]
pub fn borrow_mut(&mut self) -> &mut T
[src]Mutably borrows from an owned value. Read more
impl<T> ToOwned for T where
T: Clone,
[src]
impl<T> ToOwned for T where
T: Clone,
[src]type Owned = T
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn to_owned(&self) -> T
[src]Creates owned data from borrowed data, usually by cloning. Read more
pub fn clone_into(&self, target: &mut T)
[src]
pub fn clone_into(&self, target: &mut T)
[src]🔬 This is a nightly-only experimental API. (toowned_clone_into
)
recently added
Uses borrowed data to replace owned data, usually by cloning. Read more