You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: report.rs
    path of file: ./repos/aws-sdk-rust/examples/cross_service/rest_ses/src
    
    the code of the file until where you have to start completion: // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
// SPDX-License-Identifier: Apache-2.0

//! The `/items:report` endpoint.
use crate::{
    client::{Email, RdsClient, SesClient},
    work_item::{repository::list, WorkItem, WorkItemArchived, WorkItemError},
};
use actix_web::{
    http::StatusCode,
    put,
    web::{Data, Json},
    HttpResponse, ResponseError,
};
use aws_sdk_ses::{primitives::Blob, types::RawMessage};
use mail_builder::MessageBuilder;
use serde::Deserialize;
use serde_json::json;
use thiserror::Error;
use uuid::Uuid;
use xlsxwriter::{Format, Workbook};

#[derive(Debug, Error)]
pub enum ReportError {
    #[error("WorkItemError: {0}")]
    WorkItemError(WorkItemError),

    #[error("SES Error: {0}")]
    SesError(aws_sdk_ses::Error),

    #[error("Failed to create email message: {0}")]
    MailError(std::io::Error),

    #[error("Failed to write report xsls: {0}")]
    XslxError(xlsxwriter::XlsxError),

    #[error("Other Report Error: {0}")]
    Other(String),
}

impl ResponseError for ReportError {
    fn status_code(&self) -> StatusCode {
        match self {
            ReportError::WorkItemError(err) => err.status_code(),
            _ => StatusCode::INTERNAL_SERVER_ERROR,
        }
    }

    fn error_response(&self) -> actix_web::HttpResponse<actix_web::body::BoxBody> {
        HttpResponse::build(self.status_code()).json(json!({ "error": format!("{}", self) }))
    }
}

#[derive(Debug, Deserialize)]
pub
    
fn make_report(items: Vec<WorkItem>) -> Result<Vec<u8>, ReportError> {
    let path = format!("{ATTACHMENT_NAME}.{}.xlsx", Uuid::new_v4());
    let workbook = Workbook::new(path.as_str()).map_err(ReportError::XslxError)?;

    let body_format = {
        let mut format = Format::new();
        format.set_font_size(FONT_SIZE);
        Some(format)
    };
    let date_format = {
        let mut format = Format::new();
        format.set_num_format("dd/mm/yyyy").set_font_size(FONT_SIZE);
        Some(format)
    };
    let header_format = {
        let mut format = Format::new();
        format.set_bold().set_font_size(FONT_SIZE * 1.125);
        Some(format)
    };

    let mut report_sheet = workbook
        .add_worksheet(Some("Workitems"))
        .map_err(ReportError::XslxError)?;

    let wrote_workbook: Result<(), ReportError> = {
        for (col, text) in ["Writer", "Date", "Guide", "Description", "Status"]
            .iter()
            .enumerate()
        {
            let col: u16 = col
                .try_into()
                .map_err(|e| ReportError::Other(format!("{e}")))?;
            report_sheet
                .write_string(0, col, text, header_format.as_ref())
                .map_err(ReportError::XslxError)?;
        }

        for (row, item) in items.iter().enumerate() {
            for (col, (text, format)) in [
                (item.name(), None),
                (item.date().to_string().as_str(), date_format.as_ref()),
                (item.guide(), None),
                (item.description(), None),
                (item.status(), None),
            ]
            .iter()
            .enumerate()
            {
                let row: u32 = (row + 1)
                    .try_into()
                    .map_err(|e| ReportError::Other(format!("{e}")))?;
                let col: u16 = col
                    .try_into()
                    .map_err(|e| ReportError::Other(format!("{e}")))?;
                report_sheet
                    .write_string(row, col, text, format.or(body_format.as_ref()))
                    .map_err(ReportError::XslxError)?;
            }
        }
        Ok(())
    };

    let result = {
        // If the close fails, we have big problems and probably can't clean up.
        workbook.close().map_err(ReportError::XslxError)?;

        wrote_workbook.and_then(|()| {
            std::fs::read(&path).map_err(|err| {
                ReportError::Other(format!("Failed to read back report from {path}: {err}"))
            })
        })
    };

    let _ = std::fs::remove_file(&path).map_err(|e| {
        tracing::error!({ error = ?e }, "Failed to remove temporary file {path}");
        e
    });
    result
}