melvin_ob/http_handler/http_response/
delete_objective.rs

1use crate::http_handler::http_response::response_common::{
2    HTTPResponseType, JSONBodyHTTPResponseType, ResponseError,
3};
4
5/// Response type for the /objective endpoint -> DELETE
6#[cfg(debug_assertions)]
7pub(crate) struct DeleteObjectiveResponse {}
8
9impl JSONBodyHTTPResponseType for DeleteObjectiveResponse {}
10
11impl HTTPResponseType for DeleteObjectiveResponse {
12    /// Parsed type of the response
13    type ParsedResponseType = isize;
14
15    /// reads and parses the json response
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}