pub struct HttpResponseMeta {
pub status: StatusCode,
pub headers: HeaderMap,
pub url: Url,
pub method: Method,
}Expand description
HTTP response metadata available before body buffering/stream consumption.
Fields§
§status: StatusCodeResponse status code.
headers: HeaderMapResponse headers.
url: UrlFinal resolved URL.
method: MethodOriginating request method.
Implementations§
Source§impl HttpResponseMeta
impl HttpResponseMeta
Sourcepub fn new(
status: StatusCode,
headers: HeaderMap,
url: Url,
method: Method,
) -> Self
pub fn new( status: StatusCode, headers: HeaderMap, url: Url, method: Method, ) -> Self
Creates response metadata from status/headers/url/method parts.
Sourcepub fn retry_after_hint(&self) -> Option<Duration>
pub fn retry_after_hint(&self) -> Option<Duration>
Returns parsed Retry-After when this response status should honor it.
Applicable statuses are 429 and 5xx, and header value can be
delta-seconds or HTTP-date.
Trait Implementations§
Source§impl Clone for HttpResponseMeta
impl Clone for HttpResponseMeta
Source§fn clone(&self) -> HttpResponseMeta
fn clone(&self) -> HttpResponseMeta
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for HttpResponseMeta
impl RefUnwindSafe for HttpResponseMeta
impl Send for HttpResponseMeta
impl Sync for HttpResponseMeta
impl Unpin for HttpResponseMeta
impl UnsafeUnpin for HttpResponseMeta
impl UnwindSafe for HttpResponseMeta
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T, D> IntoConfigDefault<T> for Dwhere
D: IntoValueDefault<T>,
impl<T, D> IntoConfigDefault<T> for Dwhere
D: IntoValueDefault<T>,
Source§fn into_config_default(self) -> T
fn into_config_default(self) -> T
Converts this fallback value into
T.Source§impl<T> IntoResult<T> for T
impl<T> IntoResult<T> for T
type Err = Infallible
fn into_result(self) -> Result<T, <T as IntoResult<T>>::Err>
Source§impl<T> IntoValueDefault<T> for T
impl<T> IntoValueDefault<T> for T
Source§fn into_value_default(self) -> T
fn into_value_default(self) -> T
Converts this argument into the default value.