pub trait Color {
// Required methods
fn r(&self) -> u8;
fn g(&self) -> u8;
fn b(&self) -> u8;
fn a(&self) -> u8;
fn rgb(&self) -> [u8; 3];
fn rgba(&self) -> [u8; 4];
fn hex(&self) -> String;
fn hexa(&self) -> String;
fn paint(&self, text: &str) -> String;
fn compare(&self, other: &Rgba<u8>) -> Ordering;
}Required Methods§
fn r(&self) -> u8
fn g(&self) -> u8
fn b(&self) -> u8
fn a(&self) -> u8
fn rgb(&self) -> [u8; 3]
fn rgba(&self) -> [u8; 4]
fn hex(&self) -> String
fn hexa(&self) -> String
fn paint(&self, text: &str) -> String
fn compare(&self, other: &Rgba<u8>) -> Ordering
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".