Skip to main content

allen_intervals/
interval.rs

1#[allow(clippy::module_inception)]
2mod interval;
3mod interval_from;
4mod interval_full;
5mod interval_to;
6
7pub use self::{interval::*, interval_from::*, interval_full::*, interval_to::*};
8
9/// Error type specific to Allen's interval algebra.
10#[cfg_attr(feature = "std", derive(thiserror::Error))]
11#[derive(Clone, Copy, Debug, Hash, Eq, PartialEq, Ord, PartialOrd)]
12pub enum IntervalError {
13    /// Empty intervals are invalid with respect to Allen's interval algebra.
14    #[error("empty interval, which is not supported by Allen's interval algebra")]
15    EmptyInterval,
16    /// Could not obtain total order.
17    #[error("could not obtain total order")]
18    AmbiguousOrder,
19}