feat(domain): implement RelayState enum with serialization support

Add RelayState enum to domain layer with:
- Display, Debug, Clone, Copy, PartialEq, Eq derives
- serde Serialize/Deserialize traits for API JSON handling
- Type-safe representation of relay on/off states

TDD green phase: Tests from T019 now pass.

Ref: T020 (specs/001-modbus-relay-control/tasks.md)
This commit is contained in:
2026-01-03 22:49:13 +01:00
parent 1f552dbaf8
commit ffcff82d20
2 changed files with 4 additions and 2 deletions

View File

@@ -225,7 +225,7 @@
- **File**: src/domain/relay.rs
- **Complexity**: Low | **Uncertainty**: Low
- [ ] **T020** [P] [US1] [TDD] Implement RelayState enum
- [x] **T020** [P] [US1] [TDD] Implement RelayState enum
- Enum: On, Off
- Implement Display, Debug, Clone, Copy, PartialEq, Eq, serde::Serialize/Deserialize
- **File**: src/domain/relay.rs