pub struct Selection { /* private fields */ }Expand description
Simple selection theme struct
This will choose a predefined main color and background color based on the hash.
Both the main and background colors are defined as a Vec<RGB>.
Implements Theme
Implementations§
Trait Implementations§
Source§impl Theme for Selection
impl Theme for Selection
Source§fn main_color(&self, hash: &[u8]) -> Result<RGB, ThemeError>
fn main_color(&self, hash: &[u8]) -> Result<RGB, ThemeError>
This should return the main color within the identicon image
Source§fn background_color(&self, hash: &[u8]) -> Result<RGB, ThemeError>
fn background_color(&self, hash: &[u8]) -> Result<RGB, ThemeError>
This should return the background color within the identicon image
Auto Trait Implementations§
impl Freeze for Selection
impl RefUnwindSafe for Selection
impl Send for Selection
impl Sync for Selection
impl Unpin for Selection
impl UnwindSafe for Selection
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more