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.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Node
impl !RefUnwindSafe for Node
impl Send for Node
impl Sync for Node
impl Unpin for Node
impl !UnwindSafe for Node
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
§impl<T, D> Encode<Ambiguous1, D> for Twhere
D: ResourceDialect,
impl<T, D> Encode<Ambiguous1, D> for Twhere
D: ResourceDialect,
§impl<T, D> Encode<Ambiguous2, D> for Twhere
D: ResourceDialect,
impl<T, D> Encode<Ambiguous2, D> for Twhere
D: ResourceDialect,
§impl<T> IntoAny for T
impl<T> IntoAny for T
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more