Expand description
Deserialization for converting ConfigValue instances to target types.
The Deserializer type is the main driver of deserialization.
The workflow is roughly:
GlobalContext::get<T>()createsDeserializerand callsT::deserialize()- Then call type-specific deserialize methods as in normal serde deserialization.
- For primitives,
deserialize_*methods look upConfigValueinstances inGlobalContextand convert. - Structs and maps are handled by
ConfigMapAccess. - Sequences are handled by
ConfigSeqAccess, which later usesArrayItemDeserializerfor each array item. Value<T>is delegated toValueDeserializerindeserialize_struct.
- For primitives,
The purpose of this workflow is to:
- Retrieve the correct config value based on source location precedence
- Provide richer error context showing where a config is defined
- Provide a richer internal API to map to concrete config types
without touching underlying
ConfigValuedirectly
Macrosยง
- deserialize_
method ๐
Structsยง
- Array
Item ๐Deserializer - A deserializer for individual
ConfigValueitems in arrays - Config
MapAccess ๐ - Config
SeqAccess ๐ - Deserializer ๐
- Serde deserializer used to convert config values to a target type using
GlobalContext::get. - Tuple2
Deserializer ๐ - A deserializer which takes two values and deserializes into a tuple of those
two values. This is similar to types like
StrDeserializerin upstream serde itself. - Value
Deserializer ๐ - This is a deserializer that deserializes into a
Value<T>for configuration.
Enumsยง
- KeyKind ๐
- Value
Source ๐ - Source of data for
ValueDeserializer