Skip to main content

elevator_core/
ids.rs

1//! Typed identifiers for simulation concepts (groups).
2
3use serde::{Deserialize, Serialize};
4
5/// Numeric identifier for an elevator group.
6#[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Serialize, Deserialize)]
7pub struct GroupId(pub u32);
8
9impl std::fmt::Display for GroupId {
10    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
11        write!(f, "GroupId({})", self.0)
12    }
13}