Struct stylish_core::Foreground
source · [−]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
sourceimpl Clone for Foreground
impl Clone for Foreground
sourcefn clone(&self) -> Foreground
fn clone(&self) -> Foreground
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for Foreground
impl Debug for Foreground
sourceimpl Default for Foreground
impl Default for Foreground
sourcefn default() -> Foreground
fn default() -> Foreground
Returns the “default value” for a type. Read more
sourceimpl PartialEq<Foreground> for Foreground
impl PartialEq<Foreground> for Foreground
sourcefn eq(&self, other: &Foreground) -> bool
fn eq(&self, other: &Foreground) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourceimpl Restyle for Foreground
impl Restyle for Foreground
impl Copy for Foreground
impl Eq for Foreground
impl StructuralEq for Foreground
impl StructuralPartialEq for Foreground
Auto Trait Implementations
impl RefUnwindSafe for Foreground
impl Send for Foreground
impl Sync for Foreground
impl Unpin for Foreground
impl UnwindSafe for Foreground
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
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