Skip to main content

ConvColorRepr

Trait ConvColorRepr 

pub trait ConvColorRepr: Sized {
    // Required methods
    fn from_repr(repr: ColorRepr) -> Self;
    fn to_repr(&self) -> ColorRepr;
}
Expand description

A trait for converting between a color type and its representation for serialization and deserialization

Required Methods§

fn from_repr(repr: ColorRepr) -> Self

Convert from a color representation to the color type

fn to_repr(&self) -> ColorRepr

Convert from the color type to its representation for serialization

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§