Expand description
Represents a terminal output theme.
A theme consists of a foreground and background color as well as a style.
Fields
fg: Option<Color>
Foreground color
bg: Option<Color>
Background color
style: Style
Style
Implementations
sourceimpl Theme
impl Theme
sourcepub fn new<F, B, S>(fg: F, bg: B, style: S) -> Theme where
F: Into<Option<Color>>,
B: Into<Option<Color>>,
S: Into<Option<Style>>,
pub fn new<F, B, S>(fg: F, bg: B, style: S) -> Theme where
F: Into<Option<Color>>,
B: Into<Option<Color>>,
S: Into<Option<Style>>,
Creates a new theme with given values.
Note
In order to create a Theme using default values you might want to use
Theme::default()
instead.
sourcepub fn fg<F>(self, fg: F) -> Theme where
F: Into<Option<Color>>,
pub fn fg<F>(self, fg: F) -> Theme where
F: Into<Option<Color>>,
Sets the foreground color on the given Theme and returns the new.
Trait Implementations
impl Copy for Theme
Auto Trait Implementations
impl RefUnwindSafe for Theme
impl Send for Theme
impl Sync for Theme
impl Unpin for Theme
impl UnwindSafe for Theme
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
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.
sourcefn clone_into(&self, target: &mut T)
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