pub struct Node(/* private fields */);
Expand description
Holds on to a NodeProxy
and provides simplified methods for adding child nodes.
Implementations§
Source§impl Node
impl Node
Sourcepub async fn add_owned_child(
&self,
args: NodeAddArgs,
) -> Result<(ClientEnd<NodeMarker>, ClientEnd<NodeControllerMarker>), Status>
pub async fn add_owned_child( &self, args: NodeAddArgs, ) -> Result<(ClientEnd<NodeMarker>, ClientEnd<NodeControllerMarker>), Status>
Adds an owned child node to this node and returns the [ClientEnd
]s for its
NodeController
and Node
. Use a NodeBuilder
to create the args
argument.
If you don’t need the NodeController
, it is safe to drop it, but the node will be removed
if the client end for the Node
is dropped.
Logs an error message and returns [Status::INTERNAL
] if there’s an error adding the
child node.
Sourcepub async fn add_child(
&self,
args: NodeAddArgs,
) -> Result<ClientEnd<NodeControllerMarker>, Status>
pub async fn add_child( &self, args: NodeAddArgs, ) -> Result<ClientEnd<NodeControllerMarker>, Status>
Adds an owned child node to this node and returns the [ClientEnd
]s for its
NodeController
. Use a NodeBuilder
to create the args
argument.
If you don’t need the NodeController
, it is safe to drop it. The driver runtime will
attempt to find a driver to bind the node to.
Logs an error message and returns [Status::INTERNAL
] if there’s an error adding the
child node.