#[non_exhaustive]pub enum PaneColor {
Default,
None,
Terminal,
Ansi {
index: u8,
},
BrightAnsi {
index: u8,
},
Indexed {
index: u8,
},
Rgb {
red: u8,
green: u8,
blue: u8,
},
Encoded {
value: i32,
},
}Expand description
Color encoding carried by a captured pane cell.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Default
Terminal default color sentinel.
None
Explicit no-color sentinel.
Terminal
Terminal color sentinel.
Ansi
Standard ANSI color value 0..=7.
BrightAnsi
Bright ANSI color value 90..=97.
Indexed
256-color palette value encoded with the RMUX/tmux 256-color flag.
Rgb
True-color RGB value encoded with the RMUX/tmux RGB flag.
Encoded
Unknown or future raw color encoding.
Implementations§
Source§impl PaneColor
impl PaneColor
Sourcepub const DEFAULT_ENCODING: i32 = 8
pub const DEFAULT_ENCODING: i32 = 8
Raw encoding for the terminal default color.
Sourcepub const NONE_ENCODING: i32 = -1
pub const NONE_ENCODING: i32 = -1
Raw encoding for the explicit no-color sentinel.
Sourcepub const TERMINAL_ENCODING: i32 = 9
pub const TERMINAL_ENCODING: i32 = 9
Raw encoding for the terminal color sentinel.
Sourcepub const INDEXED_FLAG: i32 = 0x0100_0000
pub const INDEXED_FLAG: i32 = 0x0100_0000
Raw flag for 256-color palette values.
Sourcepub const fn bright_ansi(index: u8) -> Self
pub const fn bright_ansi(index: u8) -> Self
Creates a bright ANSI color value.
Sourcepub fn from_encoded(value: i32) -> Self
pub fn from_encoded(value: i32) -> Self
Creates a color DTO from a raw RMUX/tmux-compatible encoding.
Trait Implementations§
impl Copy for PaneColor
Source§impl<'de> Deserialize<'de> for PaneColor
impl<'de> Deserialize<'de> for PaneColor
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 PaneColor
impl StructuralPartialEq for PaneColor
Auto Trait Implementations§
impl Freeze for PaneColor
impl RefUnwindSafe for PaneColor
impl Send for PaneColor
impl Sync for PaneColor
impl Unpin for PaneColor
impl UnsafeUnpin for PaneColor
impl UnwindSafe for PaneColor
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