pub struct ImageSource {
pub cache_capacity: usize,
pub selection: TileSelectionConfig,
pub factory: RasterSourceFactory,
}Expand description
Image source lowered onto raster rendering.
Fields§
§cache_capacity: usizeMaximum tile-cache capacity used by the created raster layer.
selection: TileSelectionConfigTile-selection policy for the created raster layer.
factory: RasterSourceFactoryFactory used to build a fresh tile source each time the style is applied.
Implementations§
Source§impl ImageSource
impl ImageSource
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 an image 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 ImageSource
impl Clone for ImageSource
Source§fn clone(&self) -> ImageSource
fn clone(&self) -> ImageSource
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 ImageSource
impl !RefUnwindSafe for ImageSource
impl Send for ImageSource
impl Sync for ImageSource
impl Unpin for ImageSource
impl UnsafeUnpin for ImageSource
impl !UnwindSafe for ImageSource
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