pub struct Tile {
pub layers: Vec<Layer>,
}Expand description
One Vector Tile.
Fields§
§layers: Vec<Layer>The layers in this vector tile
Implementations§
Source§impl Tile
impl Tile
Sourcepub fn from_compressed_bytes(bytes: &[u8]) -> Result<Tile, Error>
pub fn from_compressed_bytes(bytes: &[u8]) -> Result<Tile, Error>
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>
Sourcepub fn from_uncompressed_bytes(bytes: &[u8]) -> Result<Tile, Error>
pub fn from_uncompressed_bytes(bytes: &[u8]) -> Result<Tile, Error>
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>
Sourcepub fn from_layers(layers: Vec<Layer>) -> Self
pub fn from_layers(layers: Vec<Layer>) -> Self
Construct a tile from some layers
pub fn set_locations(&mut self, geometry_tile: &Tile)
pub fn add_feature(&mut self, layer_name: &str, f: Feature)
pub fn to_bytes(self) -> Vec<u8> ⓘ
pub fn to_compressed_bytes(self) -> Vec<u8> ⓘ
pub fn write_to<W: Write>(self, writer: &mut W)
pub fn write_to_file(self, filename: &str)
pub fn is_empty(&self) -> bool
pub fn get_layer(&self, layer_name: impl AsRef<str>) -> Option<&Layer>
pub fn get_layer_mut( &mut self, layer_name: impl AsRef<str>, ) -> Option<&mut Layer>
pub fn remove_layer(&mut self, layer_name: impl AsRef<str>) -> Option<Layer>
Trait Implementations§
impl StructuralPartialEq for Tile
Auto Trait Implementations§
impl Freeze for Tile
impl RefUnwindSafe for Tile
impl !Send for Tile
impl !Sync for Tile
impl Unpin for Tile
impl UnwindSafe for Tile
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