openehr-rm 0.0.128

openEHR RM Reference Model, generated from BMM: generations v1_1 (RM 1.1.0) and v1_2 (RM 1.2.0, current)
Documentation
// @generated by openehr-codegen from BMM (`EVENT`) — DO NOT EDIT.
// SPDX-FileCopyrightText: Cadasto B.V.
// SPDX-FileCopyrightText: openEHR Foundation
// SPDX-License-Identifier: Apache-2.0

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

use crate::v1_1::data_structures::history::interval_event::IntervalEvent;
use crate::v1_1::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>),
}