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 (`DATA_STRUCTURE`) — DO NOT EDIT.
// SPDX-FileCopyrightText: Cadasto B.V.
// SPDX-FileCopyrightText: openEHR Foundation
// SPDX-License-Identifier: Apache-2.0

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

use crate::v1_2::data_structures::history::history::History;
use crate::v1_2::data_structures::item_structure::item_list::ItemList;
use crate::v1_2::data_structures::item_structure::item_single::ItemSingle;
use crate::v1_2::data_structures::item_structure::item_structure::ItemStructure;
use crate::v1_2::data_structures::item_structure::item_table::ItemTable;
use crate::v1_2::data_structures::item_structure::item_tree::ItemTree;

/// Closed subtype set of `DATA_STRUCTURE`, dispatched on each payload's `_type`.
///
/// Abstract parent class of all data structure types.
///
/// Includes the `_as_hierarchy_` function which can generate the equivalent CEN EN13606 single hierarchy for each subtype's physical representation. For example, the physical representation of an `ITEM_LIST` is `List<ELEMENT>`; its implementation of `_as_hierarchy_` will generate a `CLUSTER` containing the set of `ELEMENT` nodes from the list.
#[doc(alias = "DATA_STRUCTURE")]
#[derive(Debug, Clone, PartialEq)]
pub enum DataStructure {
    /// The `HISTORY` subtype of `DATA_STRUCTURE`.
    History(History<ItemStructure>),
    /// The `ITEM_LIST` subtype of `DATA_STRUCTURE`.
    ItemList(ItemList),
    /// The `ITEM_SINGLE` subtype of `DATA_STRUCTURE`.
    ItemSingle(ItemSingle),
    /// The `ITEM_TABLE` subtype of `DATA_STRUCTURE`.
    ItemTable(ItemTable),
    /// The `ITEM_TREE` subtype of `DATA_STRUCTURE`.
    ItemTree(ItemTree),
}