pub struct TileResponse {
pub coord: TileCoordinate,
pub data: Bytes,
pub content_type: String,
pub cache_control: Option<String>,
pub etag: Option<String>,
pub last_modified: Option<DateTime<Utc>>,
}Expand description
Tile response.
Fields§
§coord: TileCoordinateTile coordinate
data: BytesTile data
content_type: StringContent type
cache_control: Option<String>Cache control headers
etag: Option<String>ETag for cache validation
last_modified: Option<DateTime<Utc>>Last modified timestamp
Implementations§
Source§impl TileResponse
impl TileResponse
Sourcepub fn new(coord: TileCoordinate, data: Bytes, content_type: String) -> Self
pub fn new(coord: TileCoordinate, data: Bytes, content_type: String) -> Self
Create a new tile response.
Sourcepub fn with_cache_control(self, cache_control: String) -> Self
pub fn with_cache_control(self, cache_control: String) -> Self
Set cache control.
Sourcepub fn size_bytes(&self) -> usize
pub fn size_bytes(&self) -> usize
Get the size in bytes.
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 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto 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§
impl<T> Allocation for T
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