melvin_ob/http_handler/http_response/
reset.rs

1use crate::http_handler::http_response::response_common::{
2    HTTPResponseType, JSONBodyHTTPResponseType, ResponseError,
3};
4
5/// Response type for the /reset endpoint
6#[cfg(debug_assertions)]
7pub(crate) struct ResetResponse {}
8
9impl JSONBodyHTTPResponseType for ResetResponse {}
10
11impl HTTPResponseType for ResetResponse {
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}