Function backend::model::dto::areas_impl::from_new_area_dto_to_soil_texture
source · pub fn from_new_area_dto_to_soil_texture(
dtos: Vec<NewAreaDto>,
) -> Result<Vec<SoilTexture>, ServiceError>
Expand description
Maps NewAreaDto
s to SoilTexture
s.
Precondition is that all dtos
have area_type == AreaType::SoilTexture(_)
.
§Errors
- Returns an error if any
dtos
have a differentarea_type
.