pub trait SourcePlugin:
Send
+ Sync
+ 'static {
// Required methods
fn options(&self) -> SourceTypeOptions<'_>;
fn fetch_tile(&self, info: TileFetchInfo<'_>, request: TileRequest);
// Provided method
fn cancel_tile(&self, _info: TileCancelInfo<'_>) { ... }
}Expand description
Custom tile source type implemented against the MapLibre Plugin SDK.
Required Methods§
Sourcefn options(&self) -> SourceTypeOptions<'_>
fn options(&self) -> SourceTypeOptions<'_>
Returns the source type’s name, data kind, and default tiling options.
Sourcefn fetch_tile(&self, info: TileFetchInfo<'_>, request: TileRequest)
fn fetch_tile(&self, info: TileFetchInfo<'_>, request: TileRequest)
Called when the renderer needs a tile.
Answer synchronously or move request to another thread/task and call
TileRequest::deliver.
Provided Methods§
Sourcefn cancel_tile(&self, _info: TileCancelInfo<'_>)
fn cancel_tile(&self, _info: TileCancelInfo<'_>)
Called when the renderer no longer needs a previously requested tile.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".