pub struct ColorSpaceSet { /* private fields */ }Expand description
An ordered set of color spaces (names and aliases are unique, case insensitive).
Implementations§
Source§impl ColorSpaceSet
impl ColorSpaceSet
Sourcepub fn num_color_spaces(&self) -> usize
pub fn num_color_spaces(&self) -> usize
Number of color spaces.
Sourcepub fn color_space_name_by_index(&self, index: usize) -> Option<&str>
pub fn color_space_name_by_index(&self, index: usize) -> Option<&str>
Name of the color space at index.
Sourcepub fn color_space_by_index(&self, index: usize) -> Option<&ColorSpace>
pub fn color_space_by_index(&self, index: usize) -> Option<&ColorSpace>
Color space at index.
Sourcepub fn color_space(&self, name: &str) -> Option<&ColorSpace>
pub fn color_space(&self, name: &str) -> Option<&ColorSpace>
Color space by name or alias.
Sourcepub fn color_space_index(&self, name: &str) -> Option<usize>
pub fn color_space_index(&self, name: &str) -> Option<usize>
Index of the color space by name or alias.
Sourcepub fn has_color_space(&self, name: &str) -> bool
pub fn has_color_space(&self, name: &str) -> bool
True if a color space has this name or alias.
Sourcepub fn add_color_space(&mut self, cs: &ColorSpace) -> Result<()>
pub fn add_color_space(&mut self, cs: &ColorSpace) -> Result<()>
Add a copy of the color space, replacing a color space with the same name.
Sourcepub fn add_color_spaces(&mut self, other: &ColorSpaceSet) -> Result<()>
pub fn add_color_spaces(&mut self, other: &ColorSpaceSet) -> Result<()>
Add all the color spaces of another set.
Sourcepub fn remove_color_space(&mut self, name: &str)
pub fn remove_color_space(&mut self, name: &str)
Remove a color space by name (aliases are not considered).
Sourcepub fn remove_color_spaces(&mut self, other: &ColorSpaceSet)
pub fn remove_color_spaces(&mut self, other: &ColorSpaceSet)
Remove all the color spaces of another set.
Sourcepub fn clear_color_spaces(&mut self)
pub fn clear_color_spaces(&mut self)
Remove all the color spaces.
Sourcepub fn iter(&self) -> impl Iterator<Item = &ColorSpace>
pub fn iter(&self) -> impl Iterator<Item = &ColorSpace>
Iterate over the color spaces.
Sourcepub fn union(&self, other: &ColorSpaceSet) -> Result<ColorSpaceSet>
pub fn union(&self, other: &ColorSpaceSet) -> Result<ColorSpaceSet>
Union (operator||).
Sourcepub fn intersection(&self, other: &ColorSpaceSet) -> Result<ColorSpaceSet>
pub fn intersection(&self, other: &ColorSpaceSet) -> Result<ColorSpaceSet>
Intersection (operator&&): the color spaces of other present in self.
Sourcepub fn difference(&self, other: &ColorSpaceSet) -> Result<ColorSpaceSet>
pub fn difference(&self, other: &ColorSpaceSet) -> Result<ColorSpaceSet>
Difference (operator-): the color spaces of self not in other.
Trait Implementations§
Source§impl Clone for ColorSpaceSet
impl Clone for ColorSpaceSet
Source§impl Debug for ColorSpaceSet
impl Debug for ColorSpaceSet
Source§impl Default for ColorSpaceSet
impl Default for ColorSpaceSet
Auto Trait Implementations§
impl Forget for ColorSpaceSet
impl Freeze for ColorSpaceSet
impl Move for ColorSpaceSet
impl RefUnwindSafe for ColorSpaceSet
impl Send for ColorSpaceSet
impl Sync for ColorSpaceSet
impl Unpin for ColorSpaceSet
impl UnsafeUnpin for ColorSpaceSet
impl UnwindSafe for ColorSpaceSet
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