pub trait ConfigMapper<TDto, TDomain>: Send + Sync {
// Required method
fn map(
&self,
dto: &TDto,
resolver: &DtoMapper,
) -> Result<TDomain, MappingError>;
}Expand description
Trait for converting a specific DTO config type to its domain model.
Implement this trait when you have a complex mapping between a DTO and its
corresponding domain type. The resolver parameter provides access to
DtoMapper for resolving ConfigValue references.
§Type Parameters
TDto— The DTO (Data Transfer Object) type from the API layer.TDomain— The domain model type used internally by the plugin.