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
impl ConstFormatMetadata
Sourcepub fn to_native_string(&self) -> Result<String>
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.
Sourcepub fn element_name(&self) -> Result<Option<&CStr>>
pub fn element_name(&self) -> Result<Option<&CStr>>
Borrow the element name.
Sourcepub fn element_value(&self) -> Result<Option<&CStr>>
pub fn element_value(&self) -> Result<Option<&CStr>>
Borrow the element value.
Sourcepub fn num_attributes(&self) -> Result<i32>
pub fn num_attributes(&self) -> Result<i32>
Number of attributes.
Sourcepub fn attribute_name(&self, index: i32) -> Result<Option<&CStr>>
pub fn attribute_name(&self, index: i32) -> Result<Option<&CStr>>
Borrow an attribute name by index.
Sourcepub fn attribute_value_by_index(&self, index: i32) -> Result<Option<&CStr>>
pub fn attribute_value_by_index(&self, index: i32) -> Result<Option<&CStr>>
Borrow an attribute value by index.
Sourcepub fn attribute_value(&self, name: &CStr) -> Result<Option<&CStr>>
pub fn attribute_value(&self, name: &CStr) -> Result<Option<&CStr>>
Borrow an attribute value by name.
Sourcepub fn num_children(&self) -> Result<i32>
pub fn num_children(&self) -> Result<i32>
Number of child elements.
Sourcepub fn child(&self, index: i32) -> Result<Option<Self>>
pub fn child(&self, index: i32) -> Result<Option<Self>>
Share a child; invalid indices preserve native errors.
Sourcepub fn create_editable_copy(&self) -> Result<FormatMetadata>
pub fn create_editable_copy(&self) -> Result<FormatMetadata>
Create a deep, independently editable metadata copy.