2 unstable releases
Uses new Rust 2024
| 0.2.0 | Dec 1, 2025 |
|---|---|
| 0.1.1 | Nov 17, 2025 |
| 0.1.0 |
|
#1041 in Algorithms
69KB
1.5K
SLoC
arscode
arscode provides Rust types and utilities for working with the German
Amtlicher Regionalschlüssel (ARS) — a twelve-digit hierarchical regional
classification used to identify administrative regions in Germany from the
country level down to municipalities.
Features
- Parse and format ARS codes
- Validate ARS code parts (state, district, county, admin associations, municipality)
- Inspect and navigate administrative hierarchy (parent/child levels)
- Convert between
FederalStateandARSCode
Examples
use arscode::{ARSCode, ARSLevel, FederalState};
let municipality = ARSCode::new(5, 3, 15, 8, 4, 42).unwrap();
assert_eq!(municipality.level(), ARSLevel::MUNICIPALITY);
println!("{}", municipality);
let state: ARSCode = FederalState::Hamburg.into();
assert_eq!(state.level(), ARSLevel::STATE);
Reference
- Wikipedia (DE): Amtlicher Gemeindeschlüssel — Regionalschlüssel https://de.wikipedia.org/wiki/Amtlicher_Gemeindeschl%C3%BCssel#Regionalschl%C3%BCssel
License This project is licensed under the MIT License.
Dependencies
~0.3–1MB
~21K SLoC