pub enum TileResponse<'a> {
GeoJson {
json: &'a str,
times: TileTimes,
},
Mvt {
bytes: &'a [u8],
times: TileTimes,
},
Mlt {
bytes: &'a [u8],
times: TileTimes,
},
EncodedImage {
bytes: &'a [u8],
times: TileTimes,
},
Empty {
times: TileTimes,
},
Missing,
Error {
message: &'a str,
retrying: bool,
},
}Expand description
Answer passed to TileRequest::deliver.
Variants§
GeoJson
UTF-8 GeoJSON payload for a geometry source.
Mvt
Mapbox Vector Tile bytes for a geometry source; empty delivers an empty tile.
Mlt
MapLibre Tile bytes for a geometry source; empty delivers an empty tile.
EncodedImage
Encoded image bytes (PNG, JPEG, or WebP) for a raster or raster-dem source.
Empty
Valid empty tile for any source kind.
Missing
No tile at this ID; allows the map to fall back to ancestor tiles.
Error
Tile load failure with message and retry flag.
Implementations§
Source§impl<'a> TileResponse<'a>
impl<'a> TileResponse<'a>
pub const fn geojson(json: &'a str) -> Self
pub const fn mvt(bytes: &'a [u8]) -> Self
pub const fn mlt(bytes: &'a [u8]) -> Self
pub const fn encoded_image(bytes: &'a [u8]) -> Self
pub const fn empty() -> Self
pub const fn error(message: &'a str, retrying: bool) -> Self
Trait Implementations§
Source§impl<'a> Clone for TileResponse<'a>
impl<'a> Clone for TileResponse<'a>
impl<'a> Copy for TileResponse<'a>
Auto Trait Implementations§
impl<'a> Forget for TileResponse<'a>
impl<'a> Freeze for TileResponse<'a>
impl<'a> Move for TileResponse<'a>
impl<'a> RefUnwindSafe for TileResponse<'a>
impl<'a> Send for TileResponse<'a>
impl<'a> Sync for TileResponse<'a>
impl<'a> Unpin for TileResponse<'a>
impl<'a> UnsafeUnpin for TileResponse<'a>
impl<'a> UnwindSafe for TileResponse<'a>
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