Skip to main content

ConstFileRules

Struct ConstFileRules 

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

Shared read-only file rules. Text is borrowed from the native rules object.

Implementations§

Source§

impl ConstFileRules

Source

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

Number of rules.

Source

pub fn index_for_rule(&self, name: &CStr) -> Result<usize>

Index of a named rule; OCIO reports missing names as errors.

Source

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

Borrow a rule name.

Source

pub fn num_custom_keys(&self, rule: usize) -> Result<usize>

Number of custom key/value entries on a rule.

Source

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

Borrow a custom key name.

Source

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

Borrow a custom key value.

Source

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

Create an independently editable rules object.

Source§

impl ConstFileRules

Source

pub fn is_default(&self) -> Result<bool>

Whether this is the native default rule set.

Source

pub fn pattern(&self, rule: usize) -> Result<Option<&CStr>>

Borrow a rule’s filename pattern.

Source

pub fn extension(&self, rule: usize) -> Result<Option<&CStr>>

Borrow a rule’s filename extension.

Source

pub fn regex(&self, rule: usize) -> Result<Option<&CStr>>

Borrow a rule’s regular expression.

Source

pub fn color_space(&self, rule: usize) -> Result<Option<&CStr>>

Borrow a rule’s color space.

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.