melvin_ob/http_handler/http_response/
restore_backup.rs

1use crate::http_handler::http_response::response_common::{
2    HTTPResponseType, JSONBodyHTTPResponseType, ResponseError,
3};
4
5/// Response type for the /backup endpoint -> PUT.
6#[cfg(debug_assertions)]
7pub struct RestoreBackupResponse {}
8
9impl JSONBodyHTTPResponseType for RestoreBackupResponse {}
10
11impl HTTPResponseType for RestoreBackupResponse {
12    /// Type of the parsed response.
13    type ParsedResponseType = String;
14
15    /// Reads and parses the response json body.
16    async fn read_response(
17        response: reqwest::Response,
18    ) -> Result<Self::ParsedResponseType, ResponseError> {
19        let resp = Self::unwrap_return_code(response).await?;
20        Self::parse_json_body(resp).await
21    }
22}