pub struct TileResponse {
pub data: TileData,
pub freshness: TileFreshness,
pub not_modified: bool,
}Expand description
A completed tile payload plus optional cache-freshness metadata.
Fields§
§data: TileDataThe decoded tile payload.
freshness: TileFreshnessFreshness metadata derived from the source response.
not_modified: boolWhen true, this response represents a 304 Not Modified
confirmation � the data field is a zero-cost placeholder and
should be ignored. The cache should refresh the existing entry’s
TTL using freshness without replacing its payload.
Implementations§
Source§impl TileResponse
impl TileResponse
Sourcepub fn with_freshness(self, freshness: TileFreshness) -> Self
pub fn with_freshness(self, freshness: TileFreshness) -> Self
Attach freshness metadata to this payload.
Sourcepub fn not_modified(freshness: TileFreshness) -> Self
pub fn not_modified(freshness: TileFreshness) -> Self
Create a 304 Not Modified response carrying only updated
freshness metadata.
The data field is an empty raster placeholder and should be
ignored � the cache retains the existing payload and only
refreshes its TTL.
Trait Implementations§
Source§impl Clone for TileResponse
impl Clone for TileResponse
Source§fn clone(&self) -> TileResponse
fn clone(&self) -> TileResponse
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 TileResponse
impl Debug for TileResponse
Auto Trait Implementations§
impl Freeze for TileResponse
impl RefUnwindSafe for TileResponse
impl Send for TileResponse
impl Sync for TileResponse
impl Unpin for TileResponse
impl UnsafeUnpin for TileResponse
impl UnwindSafe for TileResponse
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