#[non_exhaustive]pub struct ResponseMeta<'a> {
pub sent_us: u64,
pub received_us: u64,
pub date: Option<&'a str>,
pub etag: Option<&'a str>,
pub last_modified: Option<&'a str>,
pub final_url: Option<&'a str>,
}Expand description
An MPD response as the caller observed it.
sent_us and received_us are the caller’s monotonic microseconds when
the request left and when the first response byte arrived; the client
places the server’s FetchTime at their midpoint (23009-1 A.2). Every
header is optional: a client with none of them still plays, it just
refreshes unconditionally and has no Date clock fallback.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.sent_us: u64Monotonic microseconds when the request was sent.
received_us: u64Monotonic microseconds when the first response byte arrived.
date: Option<&'a str>The Date header, verbatim.
etag: Option<&'a str>The ETag header, verbatim.
last_modified: Option<&'a str>The Last-Modified header, verbatim.
final_url: Option<&'a str>The URL the response came from after redirects, when it differs from the URL requested.
Implementations§
Source§impl<'a> ResponseMeta<'a>
impl<'a> ResponseMeta<'a>
Sourcepub fn new(sent_us: u64, received_us: u64) -> Self
pub fn new(sent_us: u64, received_us: u64) -> Self
A response exchanged between sent_us and received_us, no headers.
Sourcepub fn at(now_us: u64) -> Self
pub fn at(now_us: u64) -> Self
A response with no round trip of its own: sent and received at now_us.
Sourcepub fn with_last_modified(self, last_modified: &'a str) -> Self
pub fn with_last_modified(self, last_modified: &'a str) -> Self
Set the Last-Modified header.
Sourcepub fn with_final_url(self, final_url: &'a str) -> Self
pub fn with_final_url(self, final_url: &'a str) -> Self
Set the post-redirect URL.