#[non_exhaustive]pub struct RequestResult<'a> {
pub status: Option<StatusCode>,
pub duration: Duration,
pub error: Option<&'a Error>,
pub from_cache: bool,
pub retryable: bool,
pub retry_after: Option<u64>,
}Expand description
How one HTTP request turned out.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.status: Option<StatusCode>What HEY answered, or None when nothing came back at all.
duration: DurationHow long HEY took to answer, before the body was read.
error: Option<&'a Error>What this request failed with, whether or not the SDK went on to resend it.
from_cache: boolThe body came out of the response cache: HEY answered 304 and the SDK read the entry it was holding.
retryable: boolThe SDK would resend this, given an attempt to spare.
retry_after: Option<u64>The seconds Retry-After named, on the statuses that carry one.
Trait Implementations§
Auto Trait Implementations§
impl<'a> !RefUnwindSafe for RequestResult<'a>
impl<'a> !UnwindSafe for RequestResult<'a>
impl<'a> Freeze for RequestResult<'a>
impl<'a> Send for RequestResult<'a>
impl<'a> Sync for RequestResult<'a>
impl<'a> Unpin for RequestResult<'a>
impl<'a> UnsafeUnpin for RequestResult<'a>
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