pub struct TextReader { /* private fields */ }Expand description
Reader for USD’s ASCII text format (.usda).
Implementations§
Source§impl TextReader
impl TextReader
Sourcepub fn iter(&self) -> impl Iterator<Item = (&Path, &Spec)>
pub fn iter(&self) -> impl Iterator<Item = (&Path, &Spec)>
Returns an iterator over all specs in the reader.
Sourcepub fn prim_children(&self, path: &Path) -> Vec<Path>
pub fn prim_children(&self, path: &Path) -> Vec<Path>
Returns the child prim paths for a given prim by reading its primChildren field.
Sourcepub fn attribute_value<T>(&self, path: &Path) -> Option<T>
pub fn attribute_value<T>(&self, path: &Path) -> Option<T>
Returns the value of an attribute if it exists and matches the requested type.
This looks for the default field on the property spec at the given path.
Trait Implementations§
Source§impl AbstractData for TextReader
impl AbstractData for TextReader
Source§fn has_spec(&self, path: &Path) -> bool
fn has_spec(&self, path: &Path) -> bool
Returns
true if this data has a spec for the given path.Source§fn has_field(&self, path: &Path, field: &str) -> bool
fn has_field(&self, path: &Path, field: &str) -> bool
Returns
true if this data has a field for the given path.Source§fn spec_type(&self, path: &Path) -> Option<SpecType>
fn spec_type(&self, path: &Path) -> Option<SpecType>
Returns the type of the spec at the given path.
Source§impl Clone for TextReader
impl Clone for TextReader
Source§fn clone(&self) -> TextReader
fn clone(&self) -> TextReader
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for TextReader
impl RefUnwindSafe for TextReader
impl Send for TextReader
impl Sync for TextReader
impl Unpin for TextReader
impl UnsafeUnpin for TextReader
impl UnwindSafe for TextReader
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more