#[repr(u32)]pub enum ColorScheme {
Light = 0,
Dark = 1,
}Expand description
Color scheme reported in response to a CSI ? 996 n query.
Variants§
Implementations§
Source§impl ColorScheme
impl ColorScheme
Sourcepub fn encode_report(self, buf: &mut [u8]) -> Result<usize>
pub fn encode_report(self, buf: &mut [u8]) -> Result<usize>
Encode a color scheme report into an escape sequence.
Encodes a color scheme report into the provided buffer. Dark color
schemes emit ESC [ ? 997 ; 1 n, and light color schemes emit
ESC [ ? 997 ; 2 n. The encoded bytes are identical to the terminal’s
internal CSI ? 996 n query response.
Hosts should gate unsolicited sends on mode 2031 being set, which can be checked via the mode getters.
If the buffer is too small, returns Error::OutOfSpace with the
required buffer size. The caller can then retry with a sufficiently
sized buffer.
Trait Implementations§
Source§impl Clone for ColorScheme
impl Clone for ColorScheme
Source§fn clone(&self) -> ColorScheme
fn clone(&self) -> ColorScheme
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 ColorScheme
Source§impl Debug for ColorScheme
impl Debug for ColorScheme
impl Eq for ColorScheme
Source§impl From<ColorScheme> for Type
impl From<ColorScheme> for Type
Source§fn from(value: ColorScheme) -> Self
fn from(value: ColorScheme) -> Self
Converts to this type from the input type.
Source§impl PartialEq for ColorScheme
impl PartialEq for ColorScheme
impl StructuralPartialEq for ColorScheme
Auto Trait Implementations§
impl Freeze for ColorScheme
impl RefUnwindSafe for ColorScheme
impl Send for ColorScheme
impl Sync for ColorScheme
impl Unpin for ColorScheme
impl UnsafeUnpin for ColorScheme
impl UnwindSafe for ColorScheme
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