pub struct TypeSchema {
pub name: &'static str,
pub path: &'static str,
pub fields: &'static [FieldSchema],
pub base: Option<&'static str>,
}Expand description
One type’s elements.
Fields§
§name: &'static strThe type name (a resource’s element name).
path: &'static strThe path the type is defined at: its own name for a resource or a datatype, the element path for a backbone element.
fields: &'static [FieldSchema]The elements, in definition order.
base: Option<&'static str>The name of the type this one specializes, its
StructureDefinition.baseDefinition
(https://hl7.org/fhir/R4/structuredefinition-definitions.html#StructureDefinition.baseDefinition);
for a backbone element, the type its element names, BackboneElement
or Element. None at the root of the hierarchy.
Implementations§
Source§impl TypeSchema
impl TypeSchema
Sourcepub fn member(&self, key: &str) -> Option<Member>
pub fn member(&self, key: &str) -> Option<Member>
The element a JSON member of this type’s object names, with the alternative a choice form selects.
key is an element name, a choice element’s stem followed by the
suffix of one alternative, or either of those behind a leading
underscore when the element or alternative is a primitive
(https://hl7.org/fhir/R4/json.html#2.6.2). A choice element’s bare
stem names no member, and neither does a key the type does not define.