pub struct RevalidationHint {
pub etag: Option<String>,
pub last_modified: Option<String>,
}Expand description
Hints passed to TileSource::request_revalidate so that the
implementation can build conditional-request headers.
Both fields are Option because the original response may not have
included these validators. When present, implementations should
send If-None-Match (for etag) and/or If-Modified-Since (for
last_modified) headers. If the server responds 304 Not Modified,
the source should return a TileResponse::not_modified result so
the cache refreshes its TTL without re-decoding the payload.
Fields§
§etag: Option<String>Value of the ETag header from the previous response.
last_modified: Option<String>Value of the Last-Modified header from the previous response.
Implementations§
Source§impl RevalidationHint
impl RevalidationHint
Sourcepub fn has_validators(&self) -> bool
pub fn has_validators(&self) -> bool
Whether this hint carries at least one usable validator.
Trait Implementations§
Source§impl Clone for RevalidationHint
impl Clone for RevalidationHint
Source§fn clone(&self) -> RevalidationHint
fn clone(&self) -> RevalidationHint
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for RevalidationHint
impl Debug for RevalidationHint
Source§impl Default for RevalidationHint
impl Default for RevalidationHint
Source§fn default() -> RevalidationHint
fn default() -> RevalidationHint
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for RevalidationHint
impl RefUnwindSafe for RevalidationHint
impl Send for RevalidationHint
impl Sync for RevalidationHint
impl Unpin for RevalidationHint
impl UnsafeUnpin for RevalidationHint
impl UnwindSafe for RevalidationHint
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