[][src]Struct homie_controller::Node

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

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

impl Node[src]

pub fn has_required_attributes(&self) -> bool[src]

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

Trait Implementations

impl Clone for Node[src]

impl Debug for Node[src]

impl Eq for Node[src]

impl PartialEq<Node> for Node[src]

impl StructuralEq for Node[src]

impl StructuralPartialEq for Node[src]

Auto Trait Implementations

impl RefUnwindSafe for Node

impl Send for Node

impl Sync for Node

impl Unpin for Node

impl UnwindSafe for Node

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.