pub trait TileProtocol: Send + Sync {
// Required methods
fn get_tile<'life0, 'life1, 'async_trait>(
&'life0 self,
request: &'life1 TileRequest,
) -> Pin<Box<dyn Future<Output = Result<TileResponse>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn has_tile<'life0, 'life1, 'async_trait>(
&'life0 self,
coord: &'life1 TileCoordinate,
) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn get_tile_metadata<'life0, 'life1, 'async_trait>(
&'life0 self,
coord: &'life1 TileCoordinate,
) -> Pin<Box<dyn Future<Output = Result<TileMetadata>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn zoom_levels(&self) -> (u8, u8);
fn tile_size(&self) -> (u32, u32);
}Expand description
Tile protocol interface.
Required Methods§
Sourcefn get_tile<'life0, 'life1, 'async_trait>(
&'life0 self,
request: &'life1 TileRequest,
) -> Pin<Box<dyn Future<Output = Result<TileResponse>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get_tile<'life0, 'life1, 'async_trait>(
&'life0 self,
request: &'life1 TileRequest,
) -> Pin<Box<dyn Future<Output = Result<TileResponse>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Get a tile.
Sourcefn has_tile<'life0, 'life1, 'async_trait>(
&'life0 self,
coord: &'life1 TileCoordinate,
) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn has_tile<'life0, 'life1, 'async_trait>(
&'life0 self,
coord: &'life1 TileCoordinate,
) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Check if a tile exists.
Sourcefn get_tile_metadata<'life0, 'life1, 'async_trait>(
&'life0 self,
coord: &'life1 TileCoordinate,
) -> Pin<Box<dyn Future<Output = Result<TileMetadata>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get_tile_metadata<'life0, 'life1, 'async_trait>(
&'life0 self,
coord: &'life1 TileCoordinate,
) -> Pin<Box<dyn Future<Output = Result<TileMetadata>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Get tile metadata.
Sourcefn zoom_levels(&self) -> (u8, u8)
fn zoom_levels(&self) -> (u8, u8)
Get the supported zoom levels.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".