Expand description
Runtime support for generated EnergyML crates.
This crate holds everything the generated eml / resqml / witsml /
prodml crates lean on, and nothing schema-specific. It is deliberately free
of native dependencies so generated code stays usable from wasm32.
What a generated type gets:
xml- namespace-aware XML reading and writing, with explicit control of prefixes andxsi:type. Serde handles JSON only.reflect- a&'static TypeInfoper type: fields, XSD cardinality, facets, documentation, accepted types for polymorphic fields.value- object-safe dynamic access, so a UI can walk and complete an instance it has no compile-time knowledge of.path-Citation.Titlestyle access, optionally case-insensitive.validate- structural validation from the schema, plus a hook for business rules.registry- create and read objects by content type or qualified type.identity_owned- references attributed to the data object that writes them, stopping at nested data objects.relations- where a type holds other data objects by value, and where it writes references: tables written by the generator, read by byte-level scanners.identifiers- UUID, content type, qualified type and ETP URI parsing.
Generated code is written by energyml-codegen; the energyml-derive macros
turn the annotated structs it emits into implementations of the traits above.
Re-exports§
Modules§
- any_xml
- A subtree the generator does not model, kept instead of dropped.
- docs
- The model’s documentation, as JSON - the reflection, serialized once.
- error
- Error type shared by serialization, reflection and validation.
- identifiers
- Energistics identifiers: UUID, content type, qualified type and ETP URI.
- identity
- Object identity, independent of the schema version it was read from.
- identity_
owned - References, attributed to the data object that writes them.
- json
- The EnergyML JSON encoding.
- lexical
- The lexical grammar of the XSD built-ins this model keeps as strings.
- measure
- Reading a measured value without knowing its type.
- naming
- Type naming: the
obj_prefix, and how names are compared. - ns
- XML namespaces used by the Energistics schemas.
- path
- Dotted-path access into generated objects.
- prelude
- What generated code imports.
- reflect
- Static description of generated types.
- registry
- Runtime type registry.
- relations
- Static facts about where one data object holds another, or points at one.
- truncate
- Cutting a JSON document down to a budget, and saying what was cut.
- validate
- Validation.
- value
- Dynamic access to generated objects.
- xml
- XML reading and writing for generated types.
Constants§
- CITATION_
FORMAT - What every object this software writes says in
Citation.Format.
Derive Macros§
- Energyml
Choice - The derive macros, re-exported so
use energyml_core::prelude::*is the only import generated code needs. Implement the EnergyML traits for an abstract type or substitution group. - Energyml
Enum - The derive macros, re-exported so
use energyml_core::prelude::*is the only import generated code needs. Implement the EnergyML traits for an XSDsimpleTypeenumeration. - Energyml
Object - The derive macros, re-exported so
use energyml_core::prelude::*is the only import generated code needs. Implement the EnergyML traits for a struct mapped from an XSDcomplexType.