Struct swash::ColorPalette[][src]

pub struct ColorPalette<'a> { /* fields omitted */ }

Collection of colors.

Implementations

impl<'a> ColorPalette<'a>[src]

pub fn index(&self) -> u16[src]

Returns the index of the palette.

pub fn name_id(&self) -> Option<StringId>[src]

Returns the name identifier for the palette, if available.

pub fn name(&self, language: Option<&str>) -> Option<LocalizedString<'a>>[src]

Returns the name for the palette, optionally for a particular language.

pub fn usability(&self) -> Option<Usability>[src]

Returns the theme usability of the palette, if available.

pub fn len(&self) -> u16[src]

Returns the number of color entries in the palette.

pub fn get(&self, index: u16) -> [u8; 4][src]

Returns the color for the specified entry in RGBA order.

Trait Implementations

impl<'a> Clone for ColorPalette<'a>[src]

impl<'a> Copy for ColorPalette<'a>[src]

Auto Trait Implementations

impl<'a> RefUnwindSafe for ColorPalette<'a>

impl<'a> Send for ColorPalette<'a>

impl<'a> Sync for ColorPalette<'a>

impl<'a> Unpin for ColorPalette<'a>

impl<'a> UnwindSafe for ColorPalette<'a>

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.