pub struct Style {
pub text: Option<Color>,
pub background: Option<Color>,
pub intense: Option<bool>,
/* private fields */
}
Expand description
The style applied to text output.
Any fields set to None
will be set to their default format, as defined
by the Write
r.
Fields
text: Option<Color>
The text (or foreground) color.
background: Option<Color>
The background color.
intense: Option<bool>
True if the text should have increased intensity.
Implementations
sourceimpl Style
impl Style
sourcepub fn background(&mut self, background: Color) -> &mut Style
pub fn background(&mut self, background: Color) -> &mut Style
Sets the background color.
Trait Implementations
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
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcepub fn to_owned(&self) -> T
pub fn to_owned(&self) -> T
Creates owned data from borrowed data, usually by cloning. Read more
sourcepub fn clone_into(&self, target: &mut T)
pub fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more