pub struct Layer {
pub name: String,
pub features: Vec<Feature>,
pub extent: u32,
}Expand description
A Layer in a vector tile
Fields§
§name: StringThe layer’s name
features: Vec<Feature>The features in this layer
extent: u32The “extent” of this layer. Usualyy 4096 is used.
Implementations§
Source§impl Layer
impl Layer
Sourcepub fn new<S: Into<String>>(name: S) -> Self
pub fn new<S: Into<String>>(name: S) -> Self
Create an empty layer with this name (and 4096 extent)
Sourcepub fn new_and_extent(name: String, extent: u32) -> Self
pub fn new_and_extent(name: String, extent: u32) -> Self
Construct layer with this name and extent
Sourcepub fn set_locations(&mut self, geometry_tile: &Tile)
pub fn set_locations(&mut self, geometry_tile: &Tile)
Move all the geometries in this layer so that it’s at this geometry_tile.
Sourcepub fn add_feature(&mut self, f: Feature)
pub fn add_feature(&mut self, f: Feature)
Add a feature to this layer.
Trait Implementations§
impl StructuralPartialEq for Layer
Auto Trait Implementations§
impl Freeze for Layer
impl RefUnwindSafe for Layer
impl !Send for Layer
impl !Sync for Layer
impl Unpin for Layer
impl UnwindSafe for Layer
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