pub struct TileFreshness {
pub expires_at: Option<SystemTime>,
pub etag: Option<String>,
pub last_modified: Option<String>,
}Expand description
Freshness metadata attached to a fetched tile payload.
Fields§
§expires_at: Option<SystemTime>Absolute time when this payload becomes stale.
etag: Option<String>Optional entity tag used for conditional revalidation.
last_modified: Option<String>Optional Last-Modified validator.
Implementations§
Source§impl TileFreshness
impl TileFreshness
Sourcepub fn is_expired_at(&self, now: SystemTime) -> bool
pub fn is_expired_at(&self, now: SystemTime) -> bool
Return true when the payload should be treated as stale at now.
Sourcepub fn is_expired(&self) -> bool
pub fn is_expired(&self) -> bool
Return true when the payload is currently stale.
Trait Implementations§
Source§impl Clone for TileFreshness
impl Clone for TileFreshness
Source§fn clone(&self) -> TileFreshness
fn clone(&self) -> TileFreshness
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 TileFreshness
impl Debug for TileFreshness
Source§impl Default for TileFreshness
impl Default for TileFreshness
Source§fn default() -> TileFreshness
fn default() -> TileFreshness
Returns the “default value” for a type. Read more
Source§impl PartialEq for TileFreshness
impl PartialEq for TileFreshness
impl Eq for TileFreshness
impl StructuralPartialEq for TileFreshness
Auto Trait Implementations§
impl Freeze for TileFreshness
impl RefUnwindSafe for TileFreshness
impl Send for TileFreshness
impl Sync for TileFreshness
impl Unpin for TileFreshness
impl UnsafeUnpin for TileFreshness
impl UnwindSafe for TileFreshness
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