Skip to main content

ConstColorSpaceSet

Struct ConstColorSpaceSet 

Source
pub struct ConstColorSpaceSet { /* private fields */ }
Expand description

Read-only native result of a color-space set operation.

The result owns OCIO’s original const set, with no additional editable copy.

Implementations§

Source§

impl ConstColorSpaceSet

Source

pub fn try_color_space_index(&self, name: impl AsRef<str>) -> Result<i32>

Look up a name with OCIO’s matching rules; -1 means absent.

Source

pub fn try_has_color_space(&self, name: impl AsRef<str>) -> Result<bool>

Check name or alias membership, preserving native errors.

Source

pub fn try_equals<'a>( &self, other: impl Into<ColorSpaceSetRef<'a>>, ) -> Result<bool>

Compare names using OCIO’s set equality semantics, not deep color-space equality.

Source

pub fn union<'a>( &self, other: impl Into<ColorSpaceSetRef<'a>>, ) -> Result<ConstColorSpaceSet>

Return OCIO’s union as an independently owned read-only set.

Source

pub fn intersection<'a>( &self, other: impl Into<ColorSpaceSetRef<'a>>, ) -> Result<ConstColorSpaceSet>

Return OCIO’s intersection as an independently owned read-only set.

Source

pub fn difference<'a>( &self, other: impl Into<ColorSpaceSetRef<'a>>, ) -> Result<ConstColorSpaceSet>

Return OCIO’s set difference as an independently owned read-only set.

Source

pub fn try_const_color_space( &self, name: impl AsRef<str>, ) -> Result<Option<ConstColorSpace>>

Share a named native color space without making an editable copy. The returned handle retains its own native reference.

Source

pub fn try_const_color_space_by_index( &self, index: i32, ) -> Result<Option<ConstColorSpace>>

Share a native color space by index, or return None for an invalid index.

Source

pub fn try_num_color_spaces(&self) -> Result<i32>

Return the number of color spaces, preserving native errors.

Source

pub fn try_color_space_name_by_index( &self, index: i32, ) -> Result<Option<String>>

Copy the name at index, or return None for an invalid index.

Source

pub fn copy_color_space( &self, name: impl AsRef<str>, ) -> Result<Option<ColorSpace>>

Copy a named color space into an independent editable object.

Source

pub fn copy_color_space_by_index( &self, index: i32, ) -> Result<Option<ColorSpace>>

Copy an indexed color space into an independent editable object.

Source

pub fn create_editable_copy(&self) -> Result<ColorSpaceSet>

Create an editable copy on explicit request.

Trait Implementations§

Source§

impl Drop for ConstColorSpaceSet

Source§

fn drop(&mut self)

Executes the destructor for this type. Read more
Source§

fn pin_drop(self: Pin<&mut Self>)

🔬This is a nightly-only experimental API. (pin_ergonomics)
Execute the destructor for this type, but different to Drop::drop, it requires self to be pinned. Read more
Source§

impl<'a> From<&'a ConstColorSpaceSet> for ColorSpaceSetRef<'a>

Source§

fn from(value: &'a ConstColorSpaceSet) -> Self

Converts to this type from the input type.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.