Skip to main content

mig_types/
traits.rs

1//! Common traits for MIG tree types.
2
3/// Trait implemented by all generated PID-specific tree types.
4///
5/// Provides common operations that work across any PID structure:
6/// identification, metadata access, and serialization.
7pub trait PidTree: std::fmt::Debug + Send + Sync {
8    /// The PID identifier (e.g., "55001").
9    fn pid_id(&self) -> &str;
10
11    /// Human-readable description of this PID.
12    fn beschreibung(&self) -> &str;
13
14    /// Communication direction (e.g., "NB an LF").
15    fn kommunikation_von(&self) -> Option<&str>;
16
17    /// The message type (e.g., "UTILMD").
18    fn message_type(&self) -> &str;
19
20    /// The format version (e.g., "FV2504").
21    fn format_version(&self) -> &str;
22}