Struct text_terminal::ForegroundColor
source · pub struct ForegroundColor(pub Color);
Expand description
A wrapper type around Color
that is used in crate::AnsiStyleCodes
to set the foreground color (for displayed text).
Tuple Fields§
§0: Color
Implementations§
source§impl ForegroundColor
impl ForegroundColor
pub fn to_escape_code(self) -> Cow<'static, str>
Trait Implementations§
source§impl Clone for ForegroundColor
impl Clone for ForegroundColor
source§fn clone(&self) -> ForegroundColor
fn clone(&self) -> ForegroundColor
Returns a copy 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 ForegroundColor
impl Debug for ForegroundColor
source§impl Default for ForegroundColor
impl Default for ForegroundColor
source§fn default() -> ForegroundColor
fn default() -> ForegroundColor
Returns the “default value” for a type. Read more
source§impl From<Color> for ForegroundColor
impl From<Color> for ForegroundColor
source§impl PartialEq<ForegroundColor> for ForegroundColor
impl PartialEq<ForegroundColor> for ForegroundColor
source§fn eq(&self, other: &ForegroundColor) -> bool
fn eq(&self, other: &ForegroundColor) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl Copy for ForegroundColor
impl Eq for ForegroundColor
impl StructuralEq for ForegroundColor
impl StructuralPartialEq for ForegroundColor
Auto Trait Implementations§
impl RefUnwindSafe for ForegroundColor
impl Send for ForegroundColor
impl Sync for ForegroundColor
impl Unpin for ForegroundColor
impl UnwindSafe for ForegroundColor
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