style: format backend
This commit is contained in:
@@ -54,7 +54,6 @@ impl Relay {
|
||||
pub fn label(&self) -> Option<RelayLabel> {
|
||||
self.label.clone()
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
|
||||
@@ -3,11 +3,11 @@
|
||||
//! This module contains the core domain logic for relay control and management,
|
||||
//! including relay types, repository abstractions, and business rules.
|
||||
|
||||
/// Controller error types for relay operations.
|
||||
pub mod controller;
|
||||
/// Relay entity representing the relay aggregate.
|
||||
pub mod entity;
|
||||
/// Repository trait and error types for relay persistence.
|
||||
pub mod repository;
|
||||
/// Domain types for relay identification and control.
|
||||
pub mod types;
|
||||
/// Controller error types for relay operations.
|
||||
pub mod controler;
|
||||
/// Relay entity representing the relay aggregate.
|
||||
pub mod entity;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
mod relayid;
|
||||
mod relaystate;
|
||||
mod relaylabel;
|
||||
mod relaystate;
|
||||
|
||||
pub use relayid::RelayId;
|
||||
pub use relaystate::RelayState;
|
||||
pub use relaylabel::RelayLabel;
|
||||
pub use relaystate::RelayState;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
use crate::domain::relay::controler::ControllerError;
|
||||
use crate::domain::relay::controller::ControllerError;
|
||||
|
||||
/// Unique identifier for a relay in the system.
|
||||
///
|
||||
@@ -33,7 +33,6 @@ impl RelayId {
|
||||
pub const fn as_u8(&self) -> u8 {
|
||||
self.0
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
impl std::fmt::Display for RelayId {
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
use std::fmt::Display;
|
||||
|
||||
use thiserror::Error;
|
||||
|
||||
/// Human-readable label for a relay.
|
||||
@@ -15,7 +13,7 @@ pub enum RelayLabelError {
|
||||
#[error("Label cannot be empty")]
|
||||
Empty,
|
||||
#[error("Label exceeds maximum length of 50 characters: {0}")]
|
||||
TooLong(usize)
|
||||
TooLong(usize),
|
||||
}
|
||||
|
||||
impl RelayLabel {
|
||||
|
||||
Reference in New Issue
Block a user