Expand description
Righ Data Model Library
This library provides core data types and utilities for the Righ distributed mesh networking system. It includes strongly-typed identifiers, network primitives, Wi-Fi management types, and time handling utilities.
§Features
- Type Safety: Strongly-typed identifiers prevent confusion between different ID types (node IDs, model names, location IDs)
- Network Primitives: MAC address and IP address handling with validation
- Wi-Fi Management: Comprehensive Wi-Fi configuration and state management
- Time Handling: RFC 3339 timestamp utilities with validation
- Serialization: Full serde support for all types
- API Documentation: OpenAPI/Swagger schema generation support
§Modules
id- Strongly-typed identifiers for system entitiesnetwork- Network-related types (MAC addresses, IP addresses)common- Common types shared across the systemwifi- Wi-Fi configuration and management typestime- Time handling and timestamp utilities
§Examples
use righ_dm_rs::{RighNodeID, RighMacAddr, RighSSID};
use std::str::FromStr;
// Create a node identifier
let node_id = RighNodeID::new("mesh-node-001");
// Parse a MAC address
let mac_addr = RighMacAddr::from_str("00:11:22:33:44:55").unwrap();
// Create a Wi-Fi SSID
let ssid = RighSSID::from_str("MyNetwork").unwrap();