pub enum RgbOrIndex {
Rgb([u8; 3]),
Index(u8),
}Expand description
Either a true-color RGB triple or a 256-color palette index.
Variants§
Rgb([u8; 3])
[r, g, b] 24-bit color.
Index(u8)
0-255 palette index (terminal default semantics: 0-7 ANSI, 8-15 bright, 16-231 6×6×6 cube, 232-255 grayscale).
Trait Implementations§
Source§impl Clone for RgbOrIndex
impl Clone for RgbOrIndex
Source§fn clone(&self) -> RgbOrIndex
fn clone(&self) -> RgbOrIndex
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 moreimpl Copy for RgbOrIndex
Source§impl Debug for RgbOrIndex
impl Debug for RgbOrIndex
Source§impl<'de> Deserialize<'de> for RgbOrIndex
impl<'de> Deserialize<'de> for RgbOrIndex
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for RgbOrIndex
Source§impl PartialEq for RgbOrIndex
impl PartialEq for RgbOrIndex
Source§fn eq(&self, other: &RgbOrIndex) -> bool
fn eq(&self, other: &RgbOrIndex) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for RgbOrIndex
impl Serialize for RgbOrIndex
impl StructuralPartialEq for RgbOrIndex
Auto Trait Implementations§
impl Freeze for RgbOrIndex
impl RefUnwindSafe for RgbOrIndex
impl Send for RgbOrIndex
impl Sync for RgbOrIndex
impl Unpin for RgbOrIndex
impl UnsafeUnpin for RgbOrIndex
impl UnwindSafe for RgbOrIndex
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