Struct clap_builder::builder::styling::Ansi256Color
source · #[repr(transparent)]pub struct Ansi256Color(pub u8);
Expand description
Tuple Fields§
§0: u8
Implementations§
source§impl Ansi256Color
impl Ansi256Color
sourcepub fn on(self, background: impl Into<Color>) -> Style
pub fn on(self, background: impl Into<Color>) -> Style
Create a Style
with this as the foreground
sourcepub const fn on_default(self) -> Style
pub const fn on_default(self) -> Style
Create a Style
with this as the foreground
sourcepub const fn into_ansi(self) -> Option<AnsiColor>
pub const fn into_ansi(self) -> Option<AnsiColor>
Convert to AnsiColor
when there is a 1:1 mapping
sourcepub const fn from_ansi(color: AnsiColor) -> Ansi256Color
pub const fn from_ansi(color: AnsiColor) -> Ansi256Color
Losslessly convert from AnsiColor
Trait Implementations§
source§impl Clone for Ansi256Color
impl Clone for Ansi256Color
source§fn clone(&self) -> Ansi256Color
fn clone(&self) -> Ansi256Color
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 Ansi256Color
impl Debug for Ansi256Color
source§impl From<Ansi256Color> for Color
impl From<Ansi256Color> for Color
source§fn from(inner: Ansi256Color) -> Color
fn from(inner: Ansi256Color) -> Color
Converts to this type from the input type.
source§impl From<AnsiColor> for Ansi256Color
impl From<AnsiColor> for Ansi256Color
source§fn from(inner: AnsiColor) -> Ansi256Color
fn from(inner: AnsiColor) -> Ansi256Color
Converts to this type from the input type.
source§impl From<u8> for Ansi256Color
impl From<u8> for Ansi256Color
source§fn from(inner: u8) -> Ansi256Color
fn from(inner: u8) -> Ansi256Color
Converts to this type from the input type.
source§impl Hash for Ansi256Color
impl Hash for Ansi256Color
source§impl Ord for Ansi256Color
impl Ord for Ansi256Color
source§fn cmp(&self, other: &Ansi256Color) -> Ordering
fn cmp(&self, other: &Ansi256Color) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
source§impl PartialEq for Ansi256Color
impl PartialEq for Ansi256Color
source§fn eq(&self, other: &Ansi256Color) -> bool
fn eq(&self, other: &Ansi256Color) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl PartialOrd for Ansi256Color
impl PartialOrd for Ansi256Color
source§fn partial_cmp(&self, other: &Ansi256Color) -> Option<Ordering>
fn partial_cmp(&self, other: &Ansi256Color) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moreimpl Copy for Ansi256Color
impl Eq for Ansi256Color
impl StructuralPartialEq for Ansi256Color
Auto Trait Implementations§
impl Freeze for Ansi256Color
impl RefUnwindSafe for Ansi256Color
impl Send for Ansi256Color
impl Sync for Ansi256Color
impl Unpin for Ansi256Color
impl UnwindSafe for Ansi256Color
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)source§impl<T> CloneToUninit for Twhere
T: Copy,
impl<T> CloneToUninit for Twhere
T: Copy,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)