pub struct X11ColorNames { /* private fields */ }Expand description
Ghostty’s X11 color name table.
This is a borrowed view of the static table embedded in Ghostty.
Implementations§
Source§impl X11ColorNames
impl X11ColorNames
Sourcepub fn new() -> Self
pub fn new() -> Self
Get Ghostty’s X11 color name table.
Entries are in rgb.txt order. Aliases are separate entries, such as
"medium spring green" and "MediumSpringGreen". Names are the exact
supported spellings from rgb.txt; RgbColor::parse_x11_color also matches them
case-insensitively.
Sourcepub fn len(self) -> usize
pub fn len(self) -> usize
Get the number of X11 color name entries.
The returned count excludes the NULL terminator.
Sourcepub fn get(self, index: usize) -> Option<X11ColorName>
pub fn get(self, index: usize) -> Option<X11ColorName>
Get an X11 color name entry by index.
Sourcepub fn iter(self) -> X11ColorNamesIter ⓘ
pub fn iter(self) -> X11ColorNamesIter ⓘ
Iterate over the X11 color name table.
Trait Implementations§
Source§impl Clone for X11ColorNames
impl Clone for X11ColorNames
impl Copy for X11ColorNames
Source§impl Debug for X11ColorNames
impl Debug for X11ColorNames
Source§impl Default for X11ColorNames
impl Default for X11ColorNames
Source§impl IntoIterator for X11ColorNames
impl IntoIterator for X11ColorNames
Auto Trait Implementations§
impl !Send for X11ColorNames
impl !Sync for X11ColorNames
impl Freeze for X11ColorNames
impl RefUnwindSafe for X11ColorNames
impl Unpin for X11ColorNames
impl UnsafeUnpin for X11ColorNames
impl UnwindSafe for X11ColorNames
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