pub struct Path { /* private fields */ }Expand description
A path value used to locate objects in layers or scenegraphs.
Implementations§
Source§impl Path
impl Path
Sourcepub const fn empty_path() -> Self
pub const fn empty_path() -> Self
The empty path value.
Sourcepub const fn absolute_root_path() -> Self
pub const fn absolute_root_path() -> Self
The absolute path representing the top of the namespace hierarchy.
Sourcepub const fn reflexive_relative_path() -> Self
pub const fn reflexive_relative_path() -> Self
The relative path representing “self”.
Sourcepub fn is_empty(&self) -> bool
pub fn is_empty(&self) -> bool
Returns true if this path is the Path::empty_path.
Sourcepub fn is_absolute_root(&self) -> bool
pub fn is_absolute_root(&self) -> bool
Returns true if this path is the Path::absolute_root_path.
Sourcepub fn append_child(&self, child_name: &Token) -> Self
pub fn append_child(&self, child_name: &Token) -> Self
Creates a path by appending an element for child_name to this path.
This path must be a prim path, the AbsoluteRootPath or the ReflexiveRelativePath.
Sourcepub fn append_property(&self, prop_name: &Token) -> Self
pub fn append_property(&self, prop_name: &Token) -> Self
Creates a path by appending an element for prop_name to this path.
This path must be a prim path or the ReflexiveRelativePath.
Sourcepub fn append_variant_selection(&self, variant_set: &str, variant: &str) -> Self
pub fn append_variant_selection(&self, variant_set: &str, variant: &str) -> Self
Creates a path by appending an element for variant_set and variant to this path.
This path must be a prim path.
Sourcepub fn append_target(&self, target_path: &Path) -> Self
pub fn append_target(&self, target_path: &Path) -> Self
Creates a path by appending an element for target_path to this path.
This path must be a prim property or relational attribute path.
Sourcepub fn append_relational_attribute(&self, attr_name: &Token) -> Self
pub fn append_relational_attribute(&self, attr_name: &Token) -> Self
Creates a path by appending an element for attr_name to this path.
This path must be a target path.
Sourcepub fn append_mapper(&self, target_path: &Path) -> Self
pub fn append_mapper(&self, target_path: &Path) -> Self
Creates a path by appending an element for target_path to this path.
This path must be a prim property or relational attribute path.
Sourcepub fn append_mapper_arg(&self, arg_name: &Token) -> Self
pub fn append_mapper_arg(&self, arg_name: &Token) -> Self
Creates a path by appending an element for arg_name to this path.
This path must be a mapper path.
Sourcepub fn append_expression(&self) -> Self
pub fn append_expression(&self) -> Self
Creates a path by appending an expression element to this path.
This path must be a prim property or relational attribute path.
Sourcepub fn parent_path(&self) -> Self
pub fn parent_path(&self) -> Self
Return the path that identifies this path’s namespace parent.