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> CloneAny for T where
T: Any + Clone,
impl<T> CloneAny for T where
T: Any + Clone,
pub fn clone_any(&self) -> Box<dyn CloneAny + 'static, Global>
pub fn clone_any_send(&self) -> Box<dyn CloneAny + Send + 'static, Global> where
T: Send,
pub fn clone_any_sync(&self) -> Box<dyn CloneAny + Sync + 'static, Global> where
T: Sync,
pub fn clone_any_send_sync(
&self
) -> Box<dyn CloneAny + Send + Sync + 'static, Global> where
T: Send + Sync,
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