#[derive(FHIRSerdeDeserialize)]
{
// Attributes available to this derive:
#[fhir_serialize_type]
#[rename_field]
#[type_choice_field_name]
#[type_choice_variants]
#[primitive]
#[determine_by]
#[cardinality]
#[reference]
#[fhir_resource_type]
}
Expand description
Derives Serde-based FHIR JSON deserialization implementations.
The macro behavior is selected using the fhir_serialize_type attribute.
Supported deserialization types:
primitivevaluesettypechoicecomplexresource
§Panics
Panics if:
- The
fhir_serialize_typeattribute is missing. - The
fhir_serialize_typeattribute contains an unsupported value. - A deserialization type other than the supported Serde deserialization variants is specified.
§Attributes
This macro supports the following attributes:
fhir_serialize_type- Selects the deserialization implementation.rename_field- Renames a deserialized field.type_choice_field_name- Defines the field name used for type choice deserialization.type_choice_variants- Defines variants for type choice fields.primitive- Marks primitive FHIR fields.determine_by- Specifies how enum variants are determined during deserialization.cardinality- Defines validation cardinality constraints.reference- Marks reference fields.fhir_resource_type- Overrides the FHIR resource type name.