[][src]Trait elastic_types::geo::point::prelude::GeoPointFormat

pub trait GeoPointFormat {
    fn parse<'de, D>(deserializer: D) -> Result<P<f64>, D::Error>
    where
        D: Deserializer<'de>
;
fn format<S, TMapping>(
        point: &P<f64>,
        serializer: S
    ) -> Result<S::Ok, S::Error>
    where
        Self: Sized,
        TMapping: GeoPointMapping<Format = Self>,
        S: Serializer
; }

A format used for parsing and formatting geo points.

Required methods

fn parse<'de, D>(deserializer: D) -> Result<P<f64>, D::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, TMapping>(point: &P<f64>, serializer: S) -> Result<S::Ok, S::Error> where
    Self: Sized,
    TMapping: 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.

Loading content...

Implementors

impl GeoPointFormat for GeoPointArray[src]

impl GeoPointFormat for GeoPointHash[src]

impl GeoPointFormat for GeoPointObject[src]

impl GeoPointFormat for GeoPointString[src]

Loading content...