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
§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>
Converts
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>
Converts
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