terminal-colorsaurus 1.0.3

A cross-platform library for determining the terminal's background and foreground color. It answers the question «Is this terminal dark or light?».
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
use std::fmt;

pub(crate) struct DisplayAsDebug<T>(pub(crate) T);

impl<T> From<T> for DisplayAsDebug<T> {
    fn from(value: T) -> Self {
        DisplayAsDebug(value)
    }
}

impl<T: fmt::Display> fmt::Debug for DisplayAsDebug<T> {
    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
        self.0.fmt(f)
    }
}