Skip to main content

SyntheticTileSource

Struct SyntheticTileSource 

Source
pub struct SyntheticTileSource { /* private fields */ }

Implementations§

Source§

impl SyntheticTileSource

Source

pub fn new() -> Self

Source

pub fn with_tile_size(self, size: u32) -> Self

Trait Implementations§

Source§

impl Default for SyntheticTileSource

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl TileSource for SyntheticTileSource

Source§

fn tile(&self, key: TileKey) -> Option<Image>

Return the tile at (x, y, z), or None if it isn’t available (out of bounds, missing from disk, not yet downloaded, …). Implementations must not block the caller for long — kick off any expensive fetch on a background task and return None until the result lands in your cache.
Source§

fn tile_size(&self) -> u32

Tile edge length in pixels. Default 256 matches every common slippy-map source; vector / retina sources may emit 512.
Source§

fn max_zoom(&self) -> u8

Inclusive maximum zoom level this source serves. Used by the controller to clamp user-initiated zoom. Default is “any zoom up to Web Mercator’s practical ceiling”.
Source§

fn min_zoom(&self) -> u8

Inclusive minimum zoom level. Default 0 (whole world in one tile).
Source§

fn cancel_all_except(&self, _keep: &HashSet<TileKey>)

Drop any queued (but not yet started) work for keys NOT in keep. Default no-op — synchronous sources have no in-flight work to cancel. Fetching / decoding implementations should override this so rapidly-panning consumers don’t accumulate off-screen requests that waste bandwidth on tiles nobody will see by the time they arrive.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.