pub trait TileFetcher<P: Clone + Default, D: Clone + Default, T: TileReader<P, D>> {
// Required methods
fn new<R: AsRef<Path>>(path: R, threshold: Option<u8>) -> Self;
fn get_metadata(&self) -> &Metadata;
fn has_tile_wm(&self, zoom: u8, x: u32, y: u32) -> bool;
fn has_tile_s2(&self, face: Face, zoom: u8, x: u32, y: u32) -> bool;
fn get_tile_wm(&self, zoom: u8, x: u32, y: u32) -> T;
fn get_tile_s2(&self, face: Face, zoom: u8, x: u32, y: u32) -> T;
// Provided method
fn is_s2(&self) -> bool { ... }
}Available on crate feature
std only.Expand description
Tile Fetching Mechanism
Required Methods§
Sourcefn new<R: AsRef<Path>>(path: R, threshold: Option<u8>) -> Self
fn new<R: AsRef<Path>>(path: R, threshold: Option<u8>) -> Self
Creates a new file reader from a file path
Sourcefn get_metadata(&self) -> &Metadata
fn get_metadata(&self) -> &Metadata
Get the Tile Store’s Metadata
Sourcefn has_tile_s2(&self, face: Face, zoom: u8, x: u32, y: u32) -> bool
fn has_tile_s2(&self, face: Face, zoom: u8, x: u32, y: u32) -> bool
Check if an S2 Geometry tile exists
Sourcefn get_tile_wm(&self, zoom: u8, x: u32, y: u32) -> T
fn get_tile_wm(&self, zoom: u8, x: u32, y: u32) -> T
Get a WebMercator tile
Provided Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.