pub struct RasterSource {
pub cache_capacity: usize,
pub selection: TileSelectionConfig,
pub factory: RasterSourceFactory,
}Expand description
Raster tile source entry.
Fields§
§cache_capacity: usizeMaximum tile-cache capacity used by the created tile layer.
selection: TileSelectionConfigTile-selection policy for the created tile layer.
factory: RasterSourceFactoryFactory used to build a fresh tile source each time the style is applied.
Implementations§
Source§impl RasterSource
impl RasterSource
Sourcepub fn new(
factory: impl Fn() -> Box<dyn TileSource> + Send + Sync + 'static,
) -> Self
pub fn new( factory: impl Fn() -> Box<dyn TileSource> + Send + Sync + 'static, ) -> Self
Create a raster source from a tile-source factory.
Sourcepub fn with_cache_capacity(self, cache_capacity: usize) -> Self
pub fn with_cache_capacity(self, cache_capacity: usize) -> Self
Set tile cache capacity.
Sourcepub fn with_selection(self, selection: TileSelectionConfig) -> Self
pub fn with_selection(self, selection: TileSelectionConfig) -> Self
Set tile-selection policy.
Trait Implementations§
Source§impl Clone for RasterSource
impl Clone for RasterSource
Source§fn clone(&self) -> RasterSource
fn clone(&self) -> RasterSource
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for RasterSource
impl !RefUnwindSafe for RasterSource
impl Send for RasterSource
impl Sync for RasterSource
impl Unpin for RasterSource
impl UnsafeUnpin for RasterSource
impl !UnwindSafe for RasterSource
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