backend::model::dto::areas_impl

Function 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 NewAreaDtos to SoilTextures. Precondition is that all dtos have area_type == AreaType::SoilTexture(_).

ยงErrors

  • Returns an error if any dtos have a different area_type.