[−][src]Struct mapbox_vector_tile::Tile
One Vector Tile.
Fields
layers: Vec<Layer>
The layers in this vector tile
Methods
impl Tile
[src]
pub fn new() -> Self
[src]
Construct an empty layer
pub fn add_layer<L: Into<Layer>>(&mut self, l: L)
[src]
Add a layer to this tile, at the end.
pub fn from_file(filename: &str) -> Result<Tile, Error>
[src]
Read compressed .mvt file and parse it
pub fn from_compressed_bytes(bytes: &[u8]) -> Result<Tile, Error>
[src]
Try to parse a VT from some (gzip) compressed bytes
pub fn from_compressed_bytes_with_tactic(
bytes: &[u8],
invalid_geom_tactic: InvalidGeometryTactic
) -> Result<Tile, Error>
[src]
bytes: &[u8],
invalid_geom_tactic: InvalidGeometryTactic
) -> Result<Tile, Error>
pub fn from_uncompressed_bytes(bytes: &[u8]) -> Result<Tile, Error>
[src]
Try to parse a VT from some uncompressed bytes. i.e. raw protobuf
pub fn from_uncompressed_bytes_with_tactic(
bytes: &[u8],
invalid_geom_tactic: InvalidGeometryTactic
) -> Result<Tile, Error>
[src]
bytes: &[u8],
invalid_geom_tactic: InvalidGeometryTactic
) -> Result<Tile, Error>
pub fn from_layers(layers: Vec<Layer>) -> Self
[src]
Construct a tile from some layers
pub fn set_locations(&mut self, geometry_tile: &Tile)
[src]
pub fn add_feature(&mut self, layer_name: &str, f: Feature)
[src]
pub fn to_bytes(self) -> Vec<u8>
[src]
pub fn to_compressed_bytes(self) -> Vec<u8>
[src]
pub fn write_to<W: Write>(self, writer: &mut W)
[src]
pub fn write_to_file(self, filename: &str)
[src]
pub fn is_empty(&self) -> bool
[src]
pub fn get_layer(&self, layer_name: impl AsRef<str>) -> Option<&Layer>
[src]
pub fn get_layer_mut(
&mut self,
layer_name: impl AsRef<str>
) -> Option<&mut Layer>
[src]
&mut self,
layer_name: impl AsRef<str>
) -> Option<&mut Layer>
pub fn remove_layer(&mut self, layer_name: impl AsRef<str>) -> Option<Layer>
[src]
Trait Implementations
impl PartialEq<Tile> for Tile
[src]
impl Clone for Tile
[src]
fn clone(&self) -> Tile
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl Debug for Tile
[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,