opentelemetry_http

Trait ResponseExt

source
pub trait ResponseExt: Sized {
    // Required method
    fn error_for_status(self) -> Result<Self, HttpError>;
}
Expand description

Methods to make working with responses from the HttpClient trait easier.

Required Methods§

source

fn error_for_status(self) -> Result<Self, HttpError>

Turn a response into an error if the HTTP status does not indicate success (200 - 299).

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl<T> ResponseExt for Response<T>

Implementors§