#[repr(C)]pub struct ColorMap { /* private fields */ }
Expand description
Container representing a list of ColorMapItem entries.
Defines a palette to select colors using the
ColorIntroducer
control character.
Implementations§
Source§impl ColorMap
impl ColorMap
Sourcepub const fn create(items: Vec<ColorMapItem>) -> Self
pub const fn create(items: Vec<ColorMapItem>) -> Self
Creates a new ColorMap from the provided ColorMapItem list.
Sourcepub fn items(&self) -> &[ColorMapItem]
pub fn items(&self) -> &[ColorMapItem]
Gets a reference to the list of ColorMapItems.
Sourcepub fn items_mut(&mut self) -> &mut [ColorMapItem]
pub fn items_mut(&mut self) -> &mut [ColorMapItem]
Gets a mutable reference to the list of ColorMapItems.
Sourcepub fn inner(&self) -> &Vec<ColorMapItem>
pub fn inner(&self) -> &Vec<ColorMapItem>
Gets a reference to the inner representation of the list of ColorMapItems.
Sourcepub fn inner_mut(&mut self) -> &mut Vec<ColorMapItem>
pub fn inner_mut(&mut self) -> &mut Vec<ColorMapItem>
Gets a mutable reference to the inner representation of the list of ColorMapItems.
Trait Implementations§
Source§impl From<&[ColorMapItem]> for ColorMap
impl From<&[ColorMapItem]> for ColorMap
Source§fn from(val: &[ColorMapItem]) -> Self
fn from(val: &[ColorMapItem]) -> Self
Converts to this type from the input type.
Source§impl<const N: usize> From<&[ColorMapItem; N]> for ColorMap
impl<const N: usize> From<&[ColorMapItem; N]> for ColorMap
Source§fn from(val: &[ColorMapItem; N]) -> Self
fn from(val: &[ColorMapItem; N]) -> Self
Converts to this type from the input type.
Source§impl<const N: usize> From<[ColorMapItem; N]> for ColorMap
impl<const N: usize> From<[ColorMapItem; N]> for ColorMap
Source§fn from(val: [ColorMapItem; N]) -> Self
fn from(val: [ColorMapItem; N]) -> Self
Converts to this type from the input type.
Source§impl From<Vec<ColorMapItem>> for ColorMap
impl From<Vec<ColorMapItem>> for ColorMap
Source§fn from(val: Vec<ColorMapItem>) -> Self
fn from(val: Vec<ColorMapItem>) -> Self
Converts to this type from the input type.
impl StructuralPartialEq for ColorMap
Auto Trait Implementations§
impl Freeze for ColorMap
impl RefUnwindSafe for ColorMap
impl Send for ColorMap
impl Sync for ColorMap
impl Unpin for ColorMap
impl UnwindSafe for ColorMap
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