openehr-lang 0.0.2

openEHR LANG 1.0.0: BMM/P_BMM object model (generated from BMM) plus a hand-written ODIN instance parser (the `odin` module — deliberately off the codegen path).
Documentation
// @generated by openehr-codegen from BMM (`BMM_SIGNATURE`) — DO NOT EDIT.

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

use crate::bmm3::core::entity::bmm_property_type::BmmPropertyType;
use crate::bmm3::core::entity::bmm_routine_type::BmmRoutineType;
use crate::bmm3::core::entity::bmm_type::BmmType;

/// Built-in meta-type that expresses the type structure of any referenceable element of a model.
///
/// Consists of potential `_arguments_` and `_result_`, with constraints in descendants determining the exact form.
#[doc(alias = "BMM_SIGNATURE")]
#[derive(Debug, Clone, PartialEq)]
pub struct BmmSignatureData {
    /// Result type of signature.
    pub result_type: Box<BmmType>,
}

impl BmmSignatureData {
    /// Base name (built-in).
    /// BMM constant `base_name`.
    pub const BASE_NAME: &'static str = "Signature";
}

/// Polymorphic slot of `BMM_SIGNATURE`, dispatched on each payload's `_type`.
///
/// Built-in meta-type that expresses the type structure of any referenceable element of a model.
///
/// Consists of potential `_arguments_` and `_result_`, with constraints in descendants determining the exact form.
#[doc(alias = "BMM_SIGNATURE")]
#[derive(Debug, Clone, PartialEq)]
pub enum BmmSignature {
    /// The `BMM_PROPERTY_TYPE` subtype of `BMM_SIGNATURE`.
    BmmPropertyType(Box<BmmPropertyType>),
    /// The `BMM_ROUTINE_TYPE` subtype of `BMM_SIGNATURE`.
    BmmRoutineType(Box<BmmRoutineType>),
    /// An instance of `BMM_SIGNATURE` itself (its own, least-rich form).
    BmmSignature(BmmSignatureData),
}