Skip to main content

into_api_result

Function into_api_result 

Source
pub fn into_api_result<T, E>(response: Response) -> Result<Result<T, E>, Error>
Expand description

Deserializes a buffered response into success T or API error E by HTTP status.

Returns Ok(Ok(T)) for 2xx, Ok(Err(E)) when the body deserializes as E on non-success, or Err(Error::...) for transport/deserialize failures.