pub enum ColormapSpec {
Named(String),
Custom(Vec<(u8, u8, u8)>),
}Expand description
A colormap specification: either a built-in named colormap or a custom N×3 look-up table supplied by the user.
Variants§
Named(String)
One of the built-in named colormaps (e.g. "viridis", "hot").
Valid names are listed in VALID_COLORMAPS.
Custom(Vec<(u8, u8, u8)>)
Custom LUT: a vector of (R, G, B) triplets (at least two entries).
Component values are in [0, 255]; entries are linearly interpolated.
Trait Implementations§
Source§impl Clone for ColormapSpec
impl Clone for ColormapSpec
Source§fn clone(&self) -> ColormapSpec
fn clone(&self) -> ColormapSpec
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ColormapSpec
impl Debug for ColormapSpec
Source§impl PartialEq for ColormapSpec
impl PartialEq for ColormapSpec
Source§fn eq(&self, other: &ColormapSpec) -> bool
fn eq(&self, other: &ColormapSpec) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for ColormapSpec
Auto Trait Implementations§
impl Freeze for ColormapSpec
impl RefUnwindSafe for ColormapSpec
impl Send for ColormapSpec
impl Sync for ColormapSpec
impl Unpin for ColormapSpec
impl UnsafeUnpin for ColormapSpec
impl UnwindSafe for ColormapSpec
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