Trait elastic::types::prelude::GeoPointFormat
[−]
[src]
pub trait GeoPointFormat: Default + Default { fn parse<'de, D>(
deserializer: D
) -> Result<Point<f64>, <D as Deserializer<'de>>::Error>
where
D: Deserializer<'de>; fn format<S, M>(
point: &Point<f64>,
serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>
where
M: GeoPointMapping<Format = Self>,
S: Serializer; }
A format used for parsing and formatting geo points.
Required Methods
fn parse<'de, D>(
deserializer: D
) -> Result<Point<f64>, <D as Deserializer<'de>>::Error> where
D: Deserializer<'de>,
deserializer: D
) -> Result<Point<f64>, <D as Deserializer<'de>>::Error> where
D: Deserializer<'de>,
Parses a geo::Point
.
This requires access to the full serde
deserializer because geo points can be serialised as
different kinds of complex objects.
fn format<S, M>(
point: &Point<f64>,
serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error> where
M: GeoPointMapping<Format = Self>,
S: Serializer,
point: &Point<f64>,
serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error> where
M: GeoPointMapping<Format = Self>,
S: Serializer,
Formats a geo::Point
.
This requires access to the full serde
serializer because geo points can be serialised as
different kinds of complex objects.
Formatting also has access to the mapping type, which could be needed to build the structure properly.
Implementors
impl GeoPointFormat for GeoPointArray
impl GeoPointFormat for GeoPointString
impl GeoPointFormat for GeoPointObject
impl GeoPointFormat for GeoPointHash