Skip to main content

TileProtocol

Trait TileProtocol 

Source
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§

Source

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.

Source

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.

Source

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.

Source

fn zoom_levels(&self) -> (u8, u8)

Get the supported zoom levels.

Source

fn tile_size(&self) -> (u32, u32)

Get the tile size in pixels.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§