pub struct PooledTileSource { /* private fields */ }Expand description
A TileSource that fetches tiles over HTTP with concurrency limiting
and viewport-center priority ordering via FetchPool.
Implementations§
Source§impl PooledTileSource
impl PooledTileSource
Sourcepub fn new(
url_template: impl Into<String>,
client: Box<dyn HttpClient>,
max_concurrent: usize,
) -> Self
pub fn new( url_template: impl Into<String>, client: Box<dyn HttpClient>, max_concurrent: usize, ) -> Self
Create a new pooled tile source without image decoding.
Response bodies are assumed to be raw RGBA8 256x256 pixel data.
For real tile providers use with_decoder.
Sourcepub fn with_decoder(
url_template: impl Into<String>,
client: Box<dyn HttpClient>,
max_concurrent: usize,
decoder: Box<dyn TileDecoder>,
) -> Self
pub fn with_decoder( url_template: impl Into<String>, client: Box<dyn HttpClient>, max_concurrent: usize, decoder: Box<dyn TileDecoder>, ) -> Self
Create a new pooled tile source with a TileDecoder.
Trait Implementations§
Source§impl Debug for PooledTileSource
impl Debug for PooledTileSource
Source§impl TileSource for PooledTileSource
impl TileSource for PooledTileSource
Source§fn request_revalidate(&self, id: TileId, hint: RevalidationHint)
fn request_revalidate(&self, id: TileId, hint: RevalidationHint)
Start a conditional revalidation fetch for a stale tile. Read more
Source§fn poll(&self) -> Vec<(TileId, Result<TileResponse, TileError>)>
fn poll(&self) -> Vec<(TileId, Result<TileResponse, TileError>)>
Poll for completed tile fetches. Read more
Source§fn diagnostics(&self) -> Option<TileSourceDiagnostics>
fn diagnostics(&self) -> Option<TileSourceDiagnostics>
Optional runtime diagnostics about the source fetch pipeline.
Source§fn request_many(&self, ids: &[TileId])
fn request_many(&self, ids: &[TileId])
Start fetching multiple tiles. Read more
Source§fn request_revalidate_many(&self, ids: &[(TileId, RevalidationHint)])
fn request_revalidate_many(&self, ids: &[(TileId, RevalidationHint)])
Start conditional revalidation for multiple tiles. Read more
Source§fn cancel_many(&self, ids: &[TileId])
fn cancel_many(&self, ids: &[TileId])
Cancel multiple previously requested tile fetches. Read more
Auto Trait Implementations§
impl !Freeze for PooledTileSource
impl !RefUnwindSafe for PooledTileSource
impl Send for PooledTileSource
impl Sync for PooledTileSource
impl Unpin for PooledTileSource
impl UnsafeUnpin for PooledTileSource
impl !UnwindSafe for PooledTileSource
Blanket Implementations§
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