openehr-rm 0.0.4

openEHR RM 1.2.0 Reference Model, generated from BMM
Documentation
// @generated by openehr-codegen from BMM (`EVENT`) — DO NOT EDIT.
// Hand-written spec functions/invariants live in the sibling `*_impl.rs`.

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

use crate::data_structures::history::interval_event::IntervalEvent;
use crate::data_structures::history::point_event::PointEvent;

/// Closed subtype set of `EVENT`, dispatched on each payload's `_type`.
///
/// Defines the abstract notion of a single event in a series.
///
/// This class is generic, allowing types to be generated which are locked to particular spatial types, such as `EVENT<ITEM_LIST>`. Subtypes express point or intveral data.
#[doc(alias = "EVENT")]
#[derive(Debug, Clone, PartialEq)]
pub enum Event<T> {
    /// The `INTERVAL_EVENT` subtype of `EVENT`.
    IntervalEvent(IntervalEvent<T>),
    /// The `POINT_EVENT` subtype of `EVENT`.
    PointEvent(PointEvent<T>),
}