nodedb-types 0.1.0

Portable type definitions shared between NodeDB Origin and NodeDB-Lite
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
// SPDX-License-Identifier: Apache-2.0

//! First-class DateTime and Duration types.
//!
//! `NdbDateTime` stores microseconds since Unix epoch (1970-01-01T00:00:00Z).
//! `NdbDuration` stores microseconds as a signed i64.
//!
//! Both serialize as strings (ISO 8601 for DateTime, human-readable for Duration)
//! for JSON compatibility. Internal representation is i64 for efficient comparison
//! and arithmetic.

pub mod duration;
pub mod error;
pub mod timestamp;

pub use duration::NdbDuration;
pub use error::NdbDateTimeError;
pub use timestamp::{DateTimeComponents, NdbDateTime};