Struct hapi_rs::node::NodeHandle
source · #[repr(transparent)]pub struct NodeHandle(_);
Expand description
A lightweight handle to a node. Can not be created manually, use HoudiniNode
instead.
Some APIs return a list of such handles for efficiency, for example HoudiniNode::find_children_by_type
.
Once you found the node you’re looking for, upgrade it to a “full” node type.
Implementations§
source§impl NodeHandle
impl NodeHandle
sourcepub fn info(&self, session: &Session) -> Result<NodeInfo>
pub fn info(&self, session: &Session) -> Result<NodeInfo>
Retrieve info about the node this handle belongs to
sourcepub fn is_valid(&self, session: &Session) -> Result<bool>
pub fn is_valid(&self, session: &Session) -> Result<bool>
Check if the handle is valid (node wasn’t deleted)
sourcepub fn to_node(&self, session: &Session) -> Result<HoudiniNode>
pub fn to_node(&self, session: &Session) -> Result<HoudiniNode>
Upgrade the handle to HoudiniNode, which has more capabilities.
Trait Implementations§
source§impl AsRef<NodeHandle> for HoudiniNode
impl AsRef<NodeHandle> for HoudiniNode
source§fn as_ref(&self) -> &NodeHandle
fn as_ref(&self) -> &NodeHandle
Converts this type into a shared reference of the (usually inferred) input type.
source§impl Clone for NodeHandle
impl Clone for NodeHandle
source§fn clone(&self) -> NodeHandle
fn clone(&self) -> NodeHandle
Returns a copy 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 moresource§impl Debug for NodeHandle
impl Debug for NodeHandle
source§impl From<&HoudiniNode> for NodeHandle
impl From<&HoudiniNode> for NodeHandle
source§fn from(n: &HoudiniNode) -> Self
fn from(n: &HoudiniNode) -> Self
Converts to this type from the input type.
source§impl From<HoudiniNode> for NodeHandle
impl From<HoudiniNode> for NodeHandle
source§fn from(n: HoudiniNode) -> Self
fn from(n: HoudiniNode) -> Self
Converts to this type from the input type.
source§impl From<NodeHandle> for c_int
impl From<NodeHandle> for c_int
source§fn from(h: NodeHandle) -> Self
fn from(h: NodeHandle) -> Self
Converts to this type from the input type.
source§impl PartialEq<NodeHandle> for NodeHandle
impl PartialEq<NodeHandle> for NodeHandle
source§fn eq(&self, other: &NodeHandle) -> bool
fn eq(&self, other: &NodeHandle) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.