1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
//! # carrier-core — what the German carrier interfaces share
//!
//! WBCI (provider ↔ provider) and S/PRI (network owner ↔ service provider) are separate
//! interfaces of the AK S&P, but they carry the same identifiers, count the same working days,
//! wrap their payloads in the same kind of envelope and must read the same hostile XML safely.
//! This crate holds that common ground, so a fix in one interface is a fix in both:
//!
//! | Module | What |
//! |---|---|
//! | [`text`] | schema facets, [`ValueError`], the [`text_type!`] and [`code_enum!`] macros |
//! | [`id`] | [`CarrierCode`], [`VorabstimmungsId`], [`LineId`] |
//! | [`calendar`] | working days: weekends, nationwide public holidays, closed days |
//! | [`count`] | working-day and working-hour arithmetic with an [`count::Explanation`] |
//! | [`envelope`] | [`Zeitstempel`], [`SignaturId`], [`SignaturText`] |
//! | [`xml`] | the bounded tree parser, the schema-order cursor and the writer |
//!
//! Its API serves the sibling crates `wbci` and `spri`, which re-export what their users need;
//! it is not stable on its own.
//!
//! ```
//! use carrier_core::{CarrierCode, VorabstimmungsId};
//!
//! let carrier: CarrierCode = "DEU.EKP1".parse()?;
//! let id = VorabstimmungsId::allocate(&carrier, 13)?;
//! assert_eq!(id.as_str(), "DEU.EKP1.V000000013");
//! # Ok::<(), carrier_core::ValueError>(())
//! ```
//!
//! Unofficial; not affiliated with or endorsed by the AK S&P, VATM or BUGLAS.
pub use Calendar;
pub use ;
pub use ;
pub use ;