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).

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl<T> ResponseExt for Response<T>

Implementors§