[][src]Struct mapbox_vector_tile::Tile

pub struct Tile {
    pub layers: Vec<Layer>,
}

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]

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]

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]

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_from(&mut self, source: &Self)
1.0.0
[src]

Performs copy-assignment from source. Read more

impl Debug for Tile[src]

Auto Trait Implementations

impl !Send for Tile

impl !Sync for Tile

Blanket Implementations

impl<T, U> Into for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

impl<T> From for T[src]

impl<T, U> TryFrom for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T> Borrow for T where
    T: ?Sized
[src]

impl<T> BorrowMut for T where
    T: ?Sized
[src]

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Any for T where
    T: 'static + ?Sized
[src]