[−][src]Struct mapbox_vector_tile::Layer
A Layer in a vector tile
Fields
name: String
The layer's name
features: Vec<Feature>
The features in this layer
extent: u32
The "extent" of this layer. Usualyy 4096 is used.
Methods
impl Layer
[src]
pub fn new<S: Into<String>>(name: S) -> Self
[src]
Create an empty layer with this name (and 4096 extent)
pub fn new_and_extent(name: String, extent: u32) -> Self
[src]
Construct layer with this name and extent
pub fn set_locations(&mut self, geometry_tile: &Tile)
[src]
Move all the geometries in this layer so that it's at this geometry_tile
.
pub fn add_feature(&mut self, f: Feature)
[src]
Add a feature to this layer.
pub fn is_empty(&self) -> bool
[src]
True iff this layer has no features
pub fn write_to<W: Write>(self, writer: &mut W)
[src]
Encode this layer to the writer
.
pub fn to_bytes(self) -> Vec<u8>
[src]
Encode this layer into bytes.
Trait Implementations
impl PartialEq<Layer> for Layer
[src]
impl From<String> for Layer
[src]
impl<'a> From<&'a str> for Layer
[src]
impl Clone for Layer
[src]
fn clone(&self) -> Layer
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl Debug for Layer
[src]
Auto Trait Implementations
Blanket Implementations
impl<T, U> Into for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
impl<T> From for T
[src]
impl<T, U> TryFrom for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T> Borrow for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,