pub use crate::core::metadata::{MessageMetadata, extract};
mod generated;
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
#[cfg_attr(feature = "serde", derive(serde::Serialize))]
#[cfg_attr(feature = "serde", serde(rename_all = "snake_case"))]
pub enum FieldKind {
Element,
Attribute,
SimpleContent,
}
#[derive(Debug, Clone, PartialEq, Eq)]
#[cfg_attr(feature = "serde", derive(serde::Serialize))]
pub struct FieldDescriptor {
pub logical_path: &'static str,
pub namespace: &'static str,
pub wire_name: &'static str,
pub rust_name: &'static str,
pub type_name: &'static str,
pub min_occurs: u32,
pub max_occurs: Option<u32>,
pub enum_values: &'static [&'static str],
pub documentation: Option<&'static str>,
pub choice_group: Option<u32>,
pub kind: FieldKind,
}
#[derive(Debug, Clone, PartialEq, Eq)]
#[cfg_attr(feature = "serde", derive(serde::Serialize))]
pub struct MessageDescriptor {
pub identity: &'static str,
pub business_area: &'static str,
pub namespace: &'static str,
pub root_element: &'static str,
pub root_type: &'static str,
pub description: Option<&'static str>,
pub schema_path: &'static str,
pub schema_sha256: &'static str,
pub generated_module: &'static str,
pub required_feature: &'static str,
pub fields: &'static [FieldDescriptor],
}
pub fn all() -> &'static [MessageDescriptor] {
generated::all()
}