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