pub struct TileRequest {
pub coord: TileCoordinate,
pub format: TileFormat,
pub layer: Option<String>,
pub style: Option<String>,
pub params: HashMap<String, String>,
}Expand description
Tile request parameters.
Fields§
§coord: TileCoordinateTile coordinate
format: TileFormatTile format (png, jpg, webp, pbf, etc.)
layer: Option<String>Optional layer name
style: Option<String>Optional style name
params: HashMap<String, String>Additional parameters
Implementations§
Source§impl TileRequest
impl TileRequest
Sourcepub fn new(coord: TileCoordinate, format: TileFormat) -> Self
pub fn new(coord: TileCoordinate, format: TileFormat) -> Self
Create a new tile request.
Sourcepub fn with_layer(self, layer: String) -> Self
pub fn with_layer(self, layer: String) -> Self
Set the layer name.
Sourcepub fn with_style(self, style: String) -> Self
pub fn with_style(self, style: String) -> Self
Set the style name.
Sourcepub fn with_param(self, key: String, value: String) -> Self
pub fn with_param(self, key: String, value: String) -> Self
Add a parameter.
Trait Implementations§
Source§impl Clone for TileRequest
impl Clone for TileRequest
Source§fn clone(&self) -> TileRequest
fn clone(&self) -> TileRequest
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 moreSource§impl Debug for TileRequest
impl Debug for TileRequest
Source§impl<'de> Deserialize<'de> for TileRequest
impl<'de> Deserialize<'de> for TileRequest
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for TileRequest
impl RefUnwindSafe for TileRequest
impl Send for TileRequest
impl Sync for TileRequest
impl Unpin for TileRequest
impl UnsafeUnpin for TileRequest
impl UnwindSafe for TileRequest
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