pub struct NodeBuilder(/* private fields */);
Expand description
A builder for adding a child node to an existing Node
.
Implementations§
Source§impl NodeBuilder
impl NodeBuilder
Sourcepub fn new(node_name: impl Into<String>) -> Self
pub fn new(node_name: impl Into<String>) -> Self
Creates a new [NodeAddBuilder
] with the given node_name
already set.
Sourcepub fn add_property(
self,
key: impl Into<PropertyKey>,
value: impl Into<PropertyValue>,
) -> Self
pub fn add_property( self, key: impl Into<PropertyKey>, value: impl Into<PropertyValue>, ) -> Self
Adds a property to the node. The key
argument is something that can convert to a
PropertyKey
, which includes strings and u32
integers. The value
argument is
something that can convert into a PropertyValue
, which includes strings, u32
integers, and bool
values.
Sourcepub fn add_offer(self, offer: Offer) -> Self
pub fn add_offer(self, offer: Offer) -> Self
Adds a service offer to the node. The offer
can be built with the
offers::ZirconServiceOffer
builder.
Sourcepub fn build(self) -> NodeAddArgs
pub fn build(self) -> NodeAddArgs
Finalize the construction of the node for use with Node::add_child
or
Node::add_owned_child
.
Auto Trait Implementations§
impl Freeze for NodeBuilder
impl RefUnwindSafe for NodeBuilder
impl Send for NodeBuilder
impl Sync for NodeBuilder
impl Unpin for NodeBuilder
impl UnwindSafe for NodeBuilder
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