matter_controller/node_info.rs
1//! Typed, snapshot-decoupled view of a commissioned node ([`MatterController::nodes`]).
2
3/// Metadata about a node commissioned onto one of the controller's fabrics.
4///
5/// Returned by [`MatterController::nodes`](crate::MatterController::nodes) and
6/// [`MatterController::commission`](crate::MatterController::commission) so
7/// callers never have to deserialize the on-disk snapshot to enumerate devices.
8///
9/// `#[non_exhaustive]`: more fields may be added without a breaking change.
10#[derive(Clone, Debug, PartialEq, Eq)]
11#[non_exhaustive]
12pub struct NodeInfo {
13 /// Operational node id on `fabric_id`.
14 pub node_id: u64,
15 /// The controller-side fabric this node belongs to. This is the stable
16 /// operational **Fabric ID** (a `u64`), not the device-side 1-based fabric
17 /// index — the controller keys its state by fabric id.
18 pub fabric_id: u64,
19 /// Device vendor id (`BasicInformation`), captured best-effort after
20 /// commissioning. `None` until captured.
21 pub vendor_id: Option<u16>,
22 /// Device product id (`BasicInformation`), captured best-effort after
23 /// commissioning. `None` until captured.
24 pub product_id: Option<u16>,
25 /// Caller-supplied opaque label from `commission()`. `None` if none given.
26 pub label: Option<String>,
27}