pub struct Node {
pub id: String,
pub name: String,
pub node_type: String,
pub properties: Vec<Property>,
}Expand description
A node of a Homie device.
Fields§
§id: StringThe subtopic ID of the node. This must be unique per device, and should follow the Homie ID format.
name: StringThe human-readable name of the node.
node_type: StringThe type of the node. This is an arbitrary string.
properties: Vec<Property>The properties of the node. There should be at least one.
Implementations§
Source§impl Node
impl Node
Sourcepub fn new(
id: &str,
name: &str,
node_type: &str,
properties: Vec<Property>,
) -> Node
pub fn new( id: &str, name: &str, node_type: &str, properties: Vec<Property>, ) -> Node
Create a new node with the given attributes.
§Arguments
id: The subtopic ID for the node. This must be unique per device, and follow the Homie ID format.name: The human-readable name of the node.type: The type of the node. This is an arbitrary string.property: The properties of the node. There should be at least one.
Trait Implementations§
impl Eq for Node
impl StructuralPartialEq for Node
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
Mutably borrows from an owned value. Read more