pub enum ThemeEntry {
Ansi(AnsiColor),
DefaultForeground(),
DefaultBackground(),
}Expand description
A color theme entry.
This enumeration combines a variant wrapping an AnsiColor with two more
variants for the default foreground and background colors to identify the
ThemeEntry::COUNT entries of a color theme. Displaying a theme entry
produces the ANSI escape sequence used to query a terminal for the
corresponding color.
Variants§
Implementations§
Source§impl ThemeEntry
impl ThemeEntry
Source§impl ThemeEntry
impl ThemeEntry
Sourcepub fn abbr(&self) -> &'static str
pub fn abbr(&self) -> &'static str
Get an abbreviation for this theme entry’s name.
This method returns a two-letter abbreviations for this theme entry. See
AnsiColor::abbr for a description of the abbreviations for ANSI
colors.
Source§impl ThemeEntry
impl ThemeEntry
Sourcepub fn request(&self) -> RequestColor
pub fn request(&self) -> RequestColor
Convert the theme entry to a color request. TTY only!
Trait Implementations§
Source§impl Clone for ThemeEntry
impl Clone for ThemeEntry
Source§fn clone(&self) -> ThemeEntry
fn clone(&self) -> ThemeEntry
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 ThemeEntry
impl Debug for ThemeEntry
Source§impl Display for ThemeEntry
impl Display for ThemeEntry
Source§impl From<AnsiColor> for ThemeEntry
impl From<AnsiColor> for ThemeEntry
Source§impl Hash for ThemeEntry
impl Hash for ThemeEntry
Source§impl Index<ThemeEntry> for Theme
impl Index<ThemeEntry> for Theme
Source§impl IndexMut<ThemeEntry> for Theme
impl IndexMut<ThemeEntry> for Theme
Source§impl Ord for ThemeEntry
impl Ord for ThemeEntry
Source§fn cmp(&self, other: &ThemeEntry) -> Ordering
fn cmp(&self, other: &ThemeEntry) -> Ordering
1.21.0 (const: unstable) · 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 ThemeEntry
impl PartialEq for ThemeEntry
Source§fn eq(&self, other: &ThemeEntry) -> bool
fn eq(&self, other: &ThemeEntry) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl PartialOrd for ThemeEntry
impl PartialOrd for ThemeEntry
Source§impl Query for ThemeEntry
Available on crate feature tty only.Theme entry as a query. TTY only!
impl Query for ThemeEntry
Available on crate feature
tty only.Theme entry as a query. TTY only!
Source§impl TryFrom<usize> for ThemeEntry
impl TryFrom<usize> for ThemeEntry
impl Command for ThemeEntry
Available on crate feature
tty only.Theme entry as a command. TTY only!
impl Copy for ThemeEntry
impl Eq for ThemeEntry
impl StructuralPartialEq for ThemeEntry
Auto Trait Implementations§
impl Freeze for ThemeEntry
impl RefUnwindSafe for ThemeEntry
impl Send for ThemeEntry
impl Sync for ThemeEntry
impl Unpin for ThemeEntry
impl UnsafeUnpin for ThemeEntry
impl UnwindSafe for ThemeEntry
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