pub struct Feature {
pub id: Option<u64>,
pub tags: Vec<u32>,
pub type: Option<i32>,
pub geometry: Vec<u32>,
}
Expand description
Features are described in section 4.2 of the specification
Fields§
§id: Option<u64>
Tags of this feature are encoded as repeated pairs of integers. A detailed description of tags is located in sections 4.2 and 4.4 of the specification
type: Option<i32>
The type of geometry stored in this feature.
geometry: Vec<u32>
Contains a stream of commands and parameters (vertices). A detailed description on geometry encoding is located in section 4.3 of the specification.
Implementations§
Trait Implementations§
source§impl GeozeroGeometry for Feature
impl GeozeroGeometry for Feature
source§impl Message for Feature
impl Message for Feature
source§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
Returns the encoded length of the message without a length delimiter.
source§fn encode<B>(&self, buf: &mut B) -> Result<(), EncodeError>
fn encode<B>(&self, buf: &mut B) -> Result<(), EncodeError>
Encodes the message to a buffer. Read more
source§fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
Encodes the message to a newly allocated buffer.
source§fn encode_length_delimited<B>(&self, buf: &mut B) -> Result<(), EncodeError>
fn encode_length_delimited<B>(&self, buf: &mut B) -> Result<(), EncodeError>
Encodes the message with a length-delimiter to a buffer. Read more
source§fn encode_length_delimited_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_length_delimited_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
Encodes the message with a length-delimiter to a newly allocated buffer.
source§fn decode<B>(buf: B) -> Result<Self, DecodeError>
fn decode<B>(buf: B) -> Result<Self, DecodeError>
Decodes an instance of the message from a buffer. Read more
source§fn decode_length_delimited<B>(buf: B) -> Result<Self, DecodeError>
fn decode_length_delimited<B>(buf: B) -> Result<Self, DecodeError>
Decodes a length-delimited instance of the message from the buffer.
source§fn merge<B>(&mut self, buf: B) -> Result<(), DecodeError>
fn merge<B>(&mut self, buf: B) -> Result<(), DecodeError>
Decodes an instance of the message from a buffer, and merges it into
self
. Read moresource§fn merge_length_delimited<B>(&mut self, buf: B) -> Result<(), DecodeError>
fn merge_length_delimited<B>(&mut self, buf: B) -> Result<(), DecodeError>
Decodes a length-delimited instance of the message from buffer, and
merges it into
self
.source§impl PartialEq for Feature
impl PartialEq for Feature
impl StructuralPartialEq for Feature
Auto Trait Implementations§
impl Freeze for Feature
impl RefUnwindSafe for Feature
impl Send for Feature
impl Sync for Feature
impl Unpin for Feature
impl UnwindSafe for Feature
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
source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§impl<T> IntoSql for T
impl<T> IntoSql for T
source§fn into_sql<T>(self) -> Self::Expression
fn into_sql<T>(self) -> Self::Expression
Convert
self
to an expression for Diesel’s query builder. Read moresource§fn as_sql<'a, T>(&'a self) -> <&'a Self as AsExpression<T>>::Expression
fn as_sql<'a, T>(&'a self) -> <&'a Self as AsExpression<T>>::Expression
Convert
&self
to an expression for Diesel’s query builder. Read moresource§impl<T> ToGdal for Twhere
T: GeozeroGeometry,
impl<T> ToGdal for Twhere
T: GeozeroGeometry,
source§fn to_gdal_ndim(&self, dims: CoordDimensions) -> Result<Geometry, GeozeroError>
fn to_gdal_ndim(&self, dims: CoordDimensions) -> Result<Geometry, GeozeroError>
Convert to GDAL geometry with dimensions.
source§impl<T> ToGeo for Twhere
T: GeozeroGeometry,
impl<T> ToGeo for Twhere
T: GeozeroGeometry,
source§impl<T> ToGeos for Twhere
T: GeozeroGeometry,
impl<T> ToGeos for Twhere
T: GeozeroGeometry,
source§impl<T> ToJson for Twhere
T: GeozeroGeometry,
impl<T> ToJson for Twhere
T: GeozeroGeometry,
source§impl<T> ToMvt for Twhere
T: GeozeroGeometry,
impl<T> ToMvt for Twhere
T: GeozeroGeometry,
source§impl<T> ToSvg for Twhere
T: GeozeroGeometry,
impl<T> ToSvg for Twhere
T: GeozeroGeometry,
source§fn to_svg_document(&self) -> Result<String, GeozeroError>
fn to_svg_document(&self) -> Result<String, GeozeroError>
Convert to SVG document.
source§impl<T> ToWkb for Twhere
T: GeozeroGeometry,
impl<T> ToWkb for Twhere
T: GeozeroGeometry,
source§fn to_wkb_dialect(
&self,
dialect: WkbDialect,
dims: CoordDimensions,
srid: Option<i32>,
envelope: Vec<f64>
) -> Result<Vec<u8>, GeozeroError>
fn to_wkb_dialect( &self, dialect: WkbDialect, dims: CoordDimensions, srid: Option<i32>, envelope: Vec<f64> ) -> Result<Vec<u8>, GeozeroError>
Convert to WKB dialect.
source§fn to_ewkb(&self, dims: CoordDimensions, srid: Option<i32>) -> Result<Vec<u8>>
fn to_ewkb(&self, dims: CoordDimensions, srid: Option<i32>) -> Result<Vec<u8>>
Convert to EWKB.
source§fn to_gpkg_wkb(
&self,
dims: CoordDimensions,
srid: Option<i32>,
envelope: Vec<f64>
) -> Result<Vec<u8>>
fn to_gpkg_wkb( &self, dims: CoordDimensions, srid: Option<i32>, envelope: Vec<f64> ) -> Result<Vec<u8>>
Convert to GeoPackage WKB.
source§impl<T> ToWkt for Twhere
T: GeozeroGeometry,
impl<T> ToWkt for Twhere
T: GeozeroGeometry,
source§fn to_wkt_ndim(&self, dims: CoordDimensions) -> Result<String, GeozeroError>
fn to_wkt_ndim(&self, dims: CoordDimensions) -> Result<String, GeozeroError>
Convert to WKT String with dimensions.
source§fn to_wkt_with_opts(
&self,
dialect: WktDialect,
dims: CoordDimensions,
srid: Option<i32>
) -> Result<String, GeozeroError>
fn to_wkt_with_opts( &self, dialect: WktDialect, dims: CoordDimensions, srid: Option<i32> ) -> Result<String, GeozeroError>
Convert to WKT String with srid, dimensions and dialect.