openehr-am 0.0.128

openEHR AM Archetype Model, generated from BMM: generations v1_4 (AM 1.4.0, ADL 1.4) and v2_4 (AM 2.4.0, ADL 2; current)
Documentation
// @generated by openehr-codegen from BMM (`C_ORDERED`) — DO NOT EDIT.
// SPDX-FileCopyrightText: Cadasto B.V.
// SPDX-FileCopyrightText: openEHR Foundation
// SPDX-License-Identifier: Apache-2.0
// Hand-written spec functions/invariants live in the sibling `*_impl.rs`.

//! The openEHR `C_ORDERED` spec class, generated from the vendored BMM
//! meta-model.

use crate::v2_4::aom2::constraint_model::primitive::c_date::CDate;
use crate::v2_4::aom2::constraint_model::primitive::c_date_time::CDateTime;
use crate::v2_4::aom2::constraint_model::primitive::c_duration::CDuration;
use crate::v2_4::aom2::constraint_model::primitive::c_integer::CInteger;
use crate::v2_4::aom2::constraint_model::primitive::c_real::CReal;
use crate::v2_4::aom2::constraint_model::primitive::c_time::CTime;

/// Closed subtype set of `C_ORDERED`, dispatched on each payload's `_type`.
///
/// Abstract parent of primitive constrainer classes based on `Ordered` base types, i.e. types like `Integer`, `Real`, and the Date/Time types.
///
/// The model constraint is a List of Intervals, which may include point Intervals, and acts as a efficient and formally tractable representation of any number of point values and/or contiguous intervals of an ordered value domain.
///
/// In its simplest form, the constraint accessor returns just a single point `Interval<T>` object, representing a single value.
///
/// The next simplest form is a single proper `Interval <T>` (i.e. normal two-sided or half-open interval). The most complex form is a list of any combination of point and proper intervals.
#[doc(alias = "C_ORDERED")]
#[derive(Debug, Clone, PartialEq)]
pub enum COrdered {
    /// The `C_DATE` subtype of `C_ORDERED`.
    CDate(CDate),
    /// The `C_DATE_TIME` subtype of `C_ORDERED`.
    CDateTime(CDateTime),
    /// The `C_DURATION` subtype of `C_ORDERED`.
    CDuration(CDuration),
    /// The `C_INTEGER` subtype of `C_ORDERED`.
    CInteger(CInteger),
    /// The `C_REAL` subtype of `C_ORDERED`.
    CReal(CReal),
    /// The `C_TIME` subtype of `C_ORDERED`.
    CTime(CTime),
}