pub struct ColorCycle {
pub colors: Vec<RGBColor>,
pub initial_index: usize,
pub tracking_index: usize,
}Expand description
Cycle through a set of colors
By default, the set is based on a modified version of the set from https://stackoverflow.com/a/13781114
Fields§
§colors: Vec<RGBColor>§initial_index: usize§tracking_index: usizeImplementations§
Source§impl ColorCycle
impl ColorCycle
pub fn next_color(&mut self) -> RGBColor
pub fn reset(&mut self)
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ColorCycle
impl RefUnwindSafe for ColorCycle
impl Send for ColorCycle
impl Sync for ColorCycle
impl Unpin for ColorCycle
impl UnsafeUnpin for ColorCycle
impl UnwindSafe for ColorCycle
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