[go: up one dir, main page]

Response

Trait Response 

Source
pub trait Response: Sealed {
    // Required methods
    fn status(&self) -> StatusCode;
    fn try_into_raw_response(self) -> impl Future<Output = Result<RawResponse>>;
}
Expand description

Represents a response from which we can get a StatusCode and collect into a RawResponse.

This is intended for internal use only and implemented only by AsyncRawResponse and RawResponse.

Required Methods§

Source

fn status(&self) -> StatusCode

Get the StatusCode from the response.

Source

fn try_into_raw_response(self) -> impl Future<Output = Result<RawResponse>>

Collect into a RawResponse.

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.

Implementors§