Enum termwiz::color::ColorAttribute
source · [−]pub enum ColorAttribute {
TrueColorWithPaletteFallback(SrgbaTuple, PaletteIndex),
TrueColorWithDefaultFallback(SrgbaTuple),
PaletteIndex(PaletteIndex),
Default,
}
Expand description
Specifies the color to be used when rendering a cell. This is the
type used in the CellAttributes
struct and can specify an optional
TrueColor value, allowing a fallback to a more traditional palette
index if TrueColor is not available.
Variants
TrueColorWithPaletteFallback(SrgbaTuple, PaletteIndex)
Use RgbColor when supported, falling back to the specified PaletteIndex.
TrueColorWithDefaultFallback(SrgbaTuple)
Use RgbColor when supported, falling back to the default color
PaletteIndex(PaletteIndex)
Use the specified PaletteIndex
Default
Use the default color
Trait Implementations
sourceimpl Clone for ColorAttribute
impl Clone for ColorAttribute
sourcefn clone(&self) -> ColorAttribute
fn clone(&self) -> ColorAttribute
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for ColorAttribute
impl Debug for ColorAttribute
sourceimpl Default for ColorAttribute
impl Default for ColorAttribute
sourceimpl<'de> Deserialize<'de> for ColorAttribute
impl<'de> Deserialize<'de> for ColorAttribute
sourcefn 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
sourceimpl From<AnsiColor> for ColorAttribute
impl From<AnsiColor> for ColorAttribute
sourceimpl From<ColorSpec> for ColorAttribute
impl From<ColorSpec> for ColorAttribute
sourceimpl FromDynamic for ColorAttribute
impl FromDynamic for ColorAttribute
fn from_dynamic(
value: &Value,
options: FromDynamicOptions
) -> Result<Self, Error>
sourceimpl PartialEq<ColorAttribute> for ColorAttribute
impl PartialEq<ColorAttribute> for ColorAttribute
sourcefn eq(&self, other: &ColorAttribute) -> bool
fn eq(&self, other: &ColorAttribute) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourcefn ne(&self, other: &ColorAttribute) -> bool
fn ne(&self, other: &ColorAttribute) -> bool
This method tests for !=
.
sourceimpl Serialize for ColorAttribute
impl Serialize for ColorAttribute
sourceimpl ToDynamic for ColorAttribute
impl ToDynamic for ColorAttribute
fn to_dynamic(&self) -> Value
impl Copy for ColorAttribute
impl Eq for ColorAttribute
impl StructuralEq for ColorAttribute
impl StructuralPartialEq for ColorAttribute
Auto Trait Implementations
impl RefUnwindSafe for ColorAttribute
impl Send for ColorAttribute
impl Sync for ColorAttribute
impl Unpin for ColorAttribute
impl UnwindSafe for ColorAttribute
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more