Trait fretboard_layout::Hex

source ·
pub trait Hex {
    type Err;

    // Required methods
    fn to_hex(&self) -> String;
    fn from_hex(_: &str) -> Result<Self, Self::Err>
       where Self: Sized;
}
Expand description

Transformations to and from hexadecimal notation (base 16)

Required Associated Types§

Required Methods§

source

fn to_hex(&self) -> String

Represent a value as a hex string

source

fn from_hex(_: &str) -> Result<Self, Self::Err>
where Self: Sized,

Convert a hex string to a value

Errors

Returns error if the hex string is not valid or value is out of bounds

Implementors§

source§

impl<T> Hex for RGB<T>
where T: Channel + Hex,

source§

impl<T> Hex for RGBA<T>
where T: Channel + Hex,