backend::model::dto::areas_impl

Function from_new_area_dto_to_shading

source
pub fn from_new_area_dto_to_shading(
    dtos: Vec<NewAreaDto>,
) -> Result<Vec<Shading>, ServiceError>
Expand description

Maps NewAreaDtos to Shadings. Precondition is that all dtos have area_type == AreaType::Shade(_).

ยงErrors

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