Skip to main content

ConstFormatMetadata

Struct ConstFormatMetadata 

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

Shared read-only metadata retained by an OCIO processor or transform.

Child handles retain the native owner. Borrowed text remains valid while this handle is alive, absent external native mutation. Metadata supplied by crate::transform::ConstTransform::with_readonly_metadata is additionally subject to that callback’s scope and aliasing safety requirements.

Implementations§

Source§

impl ConstFormatMetadata

Source

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

Format metadata using OCIO’s native stream operator. This is diagnostic text, not an XML serializer, and is copied into a Rust-owned string.

Source

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

Borrow the element name.

Source

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

Borrow the element value.

Source

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

Borrow the name attribute.

Source

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

Borrow the ID attribute.

Source

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

Number of attributes.

Source

pub fn attribute_name(&self, index: i32) -> Result<Option<&CStr>>

Borrow an attribute name by index.

Source

pub fn attribute_value_by_index(&self, index: i32) -> Result<Option<&CStr>>

Borrow an attribute value by index.

Source

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

Borrow an attribute value by name.

Source

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

Number of child elements.

Source

pub fn child(&self, index: i32) -> Result<Option<Self>>

Share a child; invalid indices preserve native errors.

Source

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

Create a deep, independently editable metadata copy.

Trait Implementations§

Source§

impl Drop for ConstFormatMetadata

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.