Struct passpartout_printer::colors::Palette
source · [−]pub struct Palette {
pub colormap: Vec<PaletteColor>,
}
Fields
colormap: Vec<PaletteColor>
Implementations
Trait Implementations
sourceimpl ColorMap for Palette
impl ColorMap for Palette
sourcefn index_of(&self, color: &Self::Color) -> usize
fn index_of(&self, color: &Self::Color) -> usize
Returns the index of the closest match of color
in the color map. Read more
sourcefn lookup(&self, index: usize) -> Option<Self::Color>
fn lookup(&self, index: usize) -> Option<Self::Color>
Looks up color by index in the color map. If idx
is out of range for the color map, or
ColorMap doesn’t implement lookup
None
is returned. Read more
sourcefn has_lookup(&self) -> bool
fn has_lookup(&self) -> bool
Determine if this implementation of ColorMap overrides the default lookup
.
Auto Trait Implementations
impl RefUnwindSafe for Palette
impl Send for Palette
impl Sync for Palette
impl Unpin for Palette
impl UnwindSafe for Palette
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<T> Pointable for T
impl<T> Pointable for T
sourceimpl<R, P> ReadPrimitive<R> for P where
R: Read + ReadEndian<P>,
P: Default,
impl<R, P> ReadPrimitive<R> for P where
R: Read + ReadEndian<P>,
P: Default,
sourcefn read_from_little_endian(read: &mut R) -> Result<Self, Error>
fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
Read this value from the supplied reader. Same as ReadEndian::read_from_little_endian()
.
sourcefn read_from_big_endian(read: &mut R) -> Result<Self, Error>
fn read_from_big_endian(read: &mut R) -> Result<Self, Error>
Read this value from the supplied reader. Same as ReadEndian::read_from_big_endian()
.
sourcefn read_from_native_endian(read: &mut R) -> Result<Self, Error>
fn read_from_native_endian(read: &mut R) -> Result<Self, Error>
Read this value from the supplied reader. Same as ReadEndian::read_from_native_endian()
.