pub struct Foreground(pub Color);
Expand description
A Restyle
implementor for setting Style::foreground
.
use stylish::{Color, Foreground, Style};
let mut expected = Style::default();
expected.foreground = Color::Magenta;
assert_eq!(Style::default().with(Foreground(Color::Magenta)), expected);
Tuple Fields§
§0: Color
Trait Implementations§
Source§impl Clone for Foreground
impl Clone for Foreground
Source§fn clone(&self) -> Foreground
fn clone(&self) -> Foreground
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for Foreground
impl Debug for Foreground
Source§impl Default for Foreground
impl Default for Foreground
Source§fn default() -> Foreground
fn default() -> Foreground
Returns the “default value” for a type. Read more
Source§impl PartialEq for Foreground
impl PartialEq for Foreground
Source§impl Restyle for Foreground
impl Restyle for Foreground
impl Copy for Foreground
impl Eq for Foreground
impl StructuralPartialEq for Foreground
Auto Trait Implementations§
impl Freeze for Foreground
impl RefUnwindSafe for Foreground
impl Send for Foreground
impl Sync for Foreground
impl Unpin for Foreground
impl UnwindSafe for Foreground
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more