#[repr(i32)]pub enum HierarchyLevel {
Unspecified = 0,
Cell = 1,
Cohort = 2,
Federation = 3,
Coalition = 4,
}Expand description
Hierarchy level for organizational units
4-tier rigid-schema model per ADR-066. Tier 5+ deferred to ADR-067 (parametric N-tier aggregation, planned).
§============================================================================ WIRE-FORMAT BREAK (ADR-066, peat#904 Phases 1+2)
This enum was previously named after military echelons. Value 4 has been rebound from its prior meaning, and values 5–6 have been removed entirely.
Old → New semantic mapping: 1: SQUAD → CELL (renamed; meaning equivalent — squad and cell were the same concept under different names, see ADR-066 §“Internal inconsistency”) 2: PLATOON → COHORT (renamed; meaning equivalent) 3: COMPANY → FEDERATION (renamed; meaning equivalent) 4: BATTALION → COALITION (REBOUND — value 4 retained but the tier name changed from a US Army echelon label to the abstract “coalition” tier. Pre-rename DeviceIdentity records carrying value 4 with battalion-equivalent membership are still semantically valid at the same tier.) 5: BRIGADE → REMOVED (tier 5+ deferred to ADR-067; pre-rename records carrying value 5 decode as UNSPECIFIED on proto3 deserialization) 6: DIVISION → REMOVED (same as 5)
Wire compatibility: peat-schema bumps to a new major version (per ADR-066’s hard-rename + no-aliases policy). Mixed-version peers cannot mutually decode. Pre-rename DeviceIdentity records persisted as binary protobuf will decode with values 5–6 silently becoming UNSPECIFIED; operators with such records must re-provision device identities before joining a post-rename mesh.
Variants§
Implementations§
Source§impl HierarchyLevel
impl HierarchyLevel
Sourcepub fn as_str_name(&self) -> &'static str
pub fn as_str_name(&self) -> &'static str
String value of the enum field names used in the ProtoBuf definition.
The values are not transformed in any way and thus are considered stable (if the ProtoBuf definition does not change) and safe for programmatic use.
Sourcepub fn from_str_name(value: &str) -> Option<Self>
pub fn from_str_name(value: &str) -> Option<Self>
Creates an enum from field names used in the ProtoBuf definition.
Trait Implementations§
Source§impl Clone for HierarchyLevel
impl Clone for HierarchyLevel
Source§fn clone(&self) -> HierarchyLevel
fn clone(&self) -> HierarchyLevel
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more