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

pub trait GeoPointFormat where
    Self: Default
{ 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
        TMapping: GeoPointMapping<Format = Self>,
        S: Serializer
; }

A format used for parsing and formatting geo points.

Required Methods

Parses a geo::Point.

This requires access to the full serde deserializer because geo points can be serialised as different kinds of complex objects.

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