pub struct Palette<'a> {
cpal: &'a Cpal<'a>,
colors: &'a [ColorRecord],
index: u32,
}Expand description
A single color palette.
Fields§
§cpal: &'a Cpal<'a>§colors: &'a [ColorRecord]§index: u32Implementations§
Source§impl<'a> Palette<'a>
impl<'a> Palette<'a>
Sourcepub fn colors(&self) -> &'a [ColorRecord]
pub fn colors(&self) -> &'a [ColorRecord]
Returns the colors in the palette.
Sourcepub fn palette_type(&self) -> Option<PaletteType>
pub fn palette_type(&self) -> Option<PaletteType>
Returns whether the palette is meant for a light or dark background, if the table provides this.
Trait Implementations§
Auto Trait Implementations§
impl<'a> Freeze for Palette<'a>
impl<'a> RefUnwindSafe for Palette<'a>
impl<'a> Send for Palette<'a>
impl<'a> Sync for Palette<'a>
impl<'a> Unpin for Palette<'a>
impl<'a> UnsafeUnpin for Palette<'a>
impl<'a> UnwindSafe for Palette<'a>
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