Crate righ_dm_rs

Crate righ_dm_rs 

Source
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 entities
  • network - Network-related types (MAC addresses, IP addresses)
  • common - Common types shared across the system
  • wifi - Wi-Fi configuration and management types
  • time - 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();

Re-exports§

pub use common::*;
pub use id::*;
pub use network::*;
pub use time::*;
pub use wifi::*;

Modules§

common
Common types and utilities shared across the Righ system.
id
Identifier types for the Righ distributed system.
network
Network-related types and utilities for the Righ system.
time
Time handling utilities for the Righ system.
wifi
Wi-Fi configuration and management types for the Righ system.