Skip to main content

ConstViewTransform

Struct ConstViewTransform 

Source
pub struct ConstViewTransform(/* private fields */);
Expand description

Shared read-only native view transform. Borrowed text remains valid while this object is alive, provided external native code does not mutate it.

Implementations§

Source§

impl ConstViewTransform

Source

pub fn name(&self) -> Result<Option<String>>

Copy the native name as owned text.

Source

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

Return OCIO’s diagnostic stream output as owned text. It is not a stable interchange format and may contain sensitive paths.

Source

pub fn name_ref(&self) -> Result<Option<&CStr>>

Borrow the native name without allocating.

Source

pub fn description(&self) -> Result<Option<&CStr>>

Borrow the native description without allocating.

Source

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

Create an editable copy. Native group-transform copies may retain children shared with the original.

Source§

impl ConstViewTransform

Source

pub fn try_interchange_attributes(&self) -> Result<BTreeMap<String, String>>

Available on crate feature v2_5 only.

Return an owned snapshot of all interchange attributes.

Source

pub fn family(&self) -> Result<Option<&CStr>>

Borrow the family string.

Source

pub fn num_categories(&self) -> Result<usize>

Number of categories.

Source

pub fn category(&self, index: usize) -> Result<Option<&CStr>>

Borrow a category; an out-of-range index returns None.

Source

pub fn has_category(&self, value: &CStr) -> Result<bool>

Check a category without allocating a C string.

Source

pub fn reference_space_type(&self) -> Result<ReferenceSpaceType>

Return the native reference-space type.

Source

pub fn interchange_attribute(&self, name: &CStr) -> Result<Option<&CStr>>

Available on crate feature v2_5 only.

Borrow an interchange attribute; invalid attribute names return an error.

Source

pub fn try_const_transform( &self, direction: ViewTransformDirection, ) -> Result<Option<ConstTransform>>

Share the transform in the requested direction.

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.