timekeep_rs/lib.rs
1//! # timekeep-rs
2//!
3//! A library for working with intervals and sets of intervals.
4//!
5//! This library provides data structures and methods for creating,
6//! manipulating, and performing set operations on intervals.
7//!
8//! ## Modules
9//!
10//! - [`atomic`]: Defines the [`AtomicInterval`] struct and its associated methods.
11//! - [`bound`]: Defines the [`Bound`] enum, representing the boundaries of an interval.
12//! - [`set`]: Defines the [`Interval`] struct, representing a set of intervals, and its associated methods.
13//!
14//! ## Usage
15//!
16//! Add `timekeep-rs` to your `Cargo.toml`:
17//!
18//! ```toml
19//! [dependencies]
20//! timekeep-rs = "0.1.0"
21//! ```
22//!
23//! Then, you can use the library in your Rust code:
24//!
25//! ```rust
26//! use timekeep_rs::{AtomicInterval, IntervalSet};
27//!
28//! let atomic_interval = AtomicInterval::closed(1, 5);
29//! let interval = IntervalSet::from(atomic_interval);
30//!
31//! println!("Interval: {}", interval.to_string());
32//! ```
33
34pub mod set;
35pub mod atomic;
36pub mod bound;
37
38pub use atomic::AtomicInterval;
39pub use bound::Bound;
40pub use set::IntervalSet;