pub struct Node {
    pub id: String,
    pub name: Option<String>,
    pub node_type: Option<String>,
    pub properties: HashMap<String, Property>,
}
Expand description

A node of a Homie device.

All attributes are required, but might not be available immediately when the node is first discovered.

Fields

id: String

The subtopic ID of the node. This is unique per device, and should follow the Homie ID format.

name: Option<String>

The human-readable name of the node. This is a required attribute, but might not be available as soon as the node is first discovered.

node_type: Option<String>

The type of the node. This is an arbitrary string. It is a required attribute, but might not be available as soon as the node is first discovered.

properties: HashMap<String, Property>

The properties of the node, keyed by their IDs. There should be at least one.

Implementations

Returns whether all the required attributes of the node and its properties are filled in.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.