Skip to main content

ColorSpaceMenuHelper

Struct ColorSpaceMenuHelper 

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

Read-only native color-space menu. Strings borrow the menu’s storage.

Implementations§

Source§

impl ColorSpaceMenuHelper

Source

pub fn serialize(&self) -> Result<String>

Serialize using OCIO’s diagnostic stream operator.

Source

pub fn create(parameters: &ColorSpaceMenuParameters) -> Result<Self>

Build a native menu. Upstream evaluates filtering and hierarchy once.

Source

pub fn num_color_spaces(&self) -> usize

Native menu num color spaces.

Source

pub fn name(&self, index: usize) -> &CStr

Native menu name. Returns an empty string if not found.

Source

pub fn ui_name(&self, index: usize) -> &CStr

Native menu ui name. Returns an empty string if not found.

Source

pub fn index_from_name(&self, name: &CStr) -> Option<usize>

Native menu index from name.

Source

pub fn index_from_ui_name(&self, name: &CStr) -> Option<usize>

Native menu index from ui name.

Source

pub fn description(&self, index: usize) -> &CStr

Native menu description. Returns an empty string if not found.

Source

pub fn family(&self, index: usize) -> &CStr

Native menu family. Returns an empty string if not found.

Source

pub fn num_hierarchy_levels(&self, index: usize) -> usize

Native menu num hierarchy levels.

Source

pub fn hierarchy_level(&self, index: usize, level: usize) -> &CStr

Native menu hierarchy level. Returns an empty string if not found.

Source

pub fn name_from_ui_name(&self, name: &CStr) -> &CStr

Native menu name from ui name. Returns an empty string if not found.

Source

pub fn ui_name_from_name(&self, name: &CStr) -> &CStr

Native menu ui name from name. Returns an empty string if not found.

Trait Implementations§

Source§

impl Drop for ColorSpaceMenuHelper

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

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.