pub struct VectorTileData {
pub layers: HashMap<String, FeatureCollection>,
}Expand description
Decoded vector tile payload: per-source-layer feature collections.
This is the output of the MVT/PBF decoder. Each key in layers
corresponds to a source layer name inside the vector tile, and
the value is the decoded feature collection for that layer.
Fields§
§layers: HashMap<String, FeatureCollection>Per-source-layer feature collections.
Implementations§
Source§impl VectorTileData
impl VectorTileData
Sourcepub fn feature_count(&self) -> usize
pub fn feature_count(&self) -> usize
Return the total number of features across all layers.
Sourcepub fn layer_count(&self) -> usize
pub fn layer_count(&self) -> usize
Return the number of source layers.
Sourcepub fn layer(&self, name: &str) -> Option<&FeatureCollection>
pub fn layer(&self, name: &str) -> Option<&FeatureCollection>
Look up a source layer by name.
Sourcepub fn layer_names(&self) -> Vec<&str>
pub fn layer_names(&self) -> Vec<&str>
Return the names of all source layers.
Sourcepub fn approx_byte_len(&self) -> usize
pub fn approx_byte_len(&self) -> usize
Approximate byte size for cache accounting.
This counts coordinate data only (16 bytes per GeoCoord).
Trait Implementations§
Source§impl Clone for VectorTileData
impl Clone for VectorTileData
Source§fn clone(&self) -> VectorTileData
fn clone(&self) -> VectorTileData
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 VectorTileData
impl RefUnwindSafe for VectorTileData
impl Send for VectorTileData
impl Sync for VectorTileData
impl Unpin for VectorTileData
impl UnsafeUnpin for VectorTileData
impl UnwindSafe for VectorTileData
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