feat(domain): implement RelayId newtype with validation

Implement smart constructor that validates relay IDs are within valid 
range (1-8 for 8-channel relay controller). Add accessor method as_u8() 
for safe access to inner value. Add comprehensive documentation to satisfy 
clippy requirements.

TDD green phase: Tests from T017 now pass.

Ref: T018 (specs/001-modbus-relay-control/tasks.md)
This commit is contained in:
2026-01-03 22:34:36 +01:00
parent 86b194ad74
commit 0ec7fdf11b
5 changed files with 41 additions and 1 deletions

View File

@@ -7,3 +7,5 @@
pub mod repository;
/// Domain types for relay identification and control.
pub mod types;
/// Controller error types for relay operations.
pub mod controler;