Expand description
§timekeep-rs
A library for working with intervals and sets of intervals.
This library provides data structures and methods for creating, manipulating, and performing set operations on intervals.
§Modules
atomic
: Defines theAtomicInterval
struct and its associated methods.bound
: Defines theBound
enum, representing the boundaries of an interval.set
: Defines the [Interval
] struct, representing a set of intervals, and its associated methods.
§Usage
Add timekeep-rs
to your Cargo.toml
:
[dependencies]
timekeep-rs = "0.1.0"
Then, you can use the library in your Rust code:
use timekeep_rs::{AtomicInterval, IntervalSet};
let atomic_interval = AtomicInterval::closed(1, 5);
let interval = IntervalSet::from(atomic_interval);
println!("Interval: {}", interval.to_string());
Re-exports§
pub use atomic::AtomicInterval;
pub use bound::Bound;
pub use set::IntervalSet;
Modules§
- atomic
- A module containing the
AtomicInterval
struct and its implementations. An atomic interval is a closed or open interval that contains a single value or a range of values. - bound
- A module containing the
Bound
struct and its implementations. A bound can either include or not include the value:Included(T)
andExcluded(T)
. - set
- Interval Set Operations Module