pub struct CustomVectorSourceOptions {
pub fetch_tile: Arc<dyn Fn(&MapHandle, &str, CanonicalTileId) + Send + Sync + 'static>,
pub cancel_tile: Option<Arc<dyn Fn(&MapHandle, &str, CanonicalTileId) + Send + Sync + 'static>>,
pub min_zoom: Option<f64>,
pub max_zoom: Option<f64>,
}Expand description
The callbacks and options of a custom vector source.
Zoom levels are whole numbers from 0 to 32.
See mln_custom_vector_source_options in the
C API reference.
Fields§
§fetch_tile: Arc<dyn Fn(&MapHandle, &str, CanonicalTileId) + Send + Sync + 'static>The callback receives (map, source_id, tile_id).
cancel_tile: Option<Arc<dyn Fn(&MapHandle, &str, CanonicalTileId) + Send + Sync + 'static>>The callback receives (map, source_id, tile_id).
min_zoom: Option<f64>§max_zoom: Option<f64>Implementations§
Trait Implementations§
Source§impl Clone for CustomVectorSourceOptions
impl Clone for CustomVectorSourceOptions
Source§fn clone(&self) -> CustomVectorSourceOptions
fn clone(&self) -> CustomVectorSourceOptions
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 !RefUnwindSafe for CustomVectorSourceOptions
impl !UnwindSafe for CustomVectorSourceOptions
impl Freeze for CustomVectorSourceOptions
impl Send for CustomVectorSourceOptions
impl Sync for CustomVectorSourceOptions
impl Unpin for CustomVectorSourceOptions
impl UnsafeUnpin for CustomVectorSourceOptions
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> ErasedDestructor for Twhere
T: 'static,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more