Struct elastic::types::prelude::GeoShape [] [src]

pub struct GeoShape<M = DefaultGeoShapeMapping> where
    M: GeoShapeMapping
{ /* fields omitted */ }

Geo shape type with a given mapping.

Defining a geo_shape with a mapping:

extern crate geojson;
use geojson::{ Geometry, Value };

let point: GeoShape<DefaultGeoShapeMapping> = GeoShape::new(
    Geometry::new(
        Value::Point(vec![ 1.0, 1.0 ])
    )
);

Methods

impl<M> GeoShape<M> where
    M: GeoShapeMapping
[src]

Creates a new GeoShape from the given Geometry.

This function will consume the provided Geometry.

Examples

use geojson::{ Geometry, Value };
    
let point: GeoShape = GeoShape::new(
    Geometry::new(
        Value::Point(vec![ 1.0, 1.0 ])
    )
);

Change the mapping of this geo shape.

Methods from Deref<Target = Geometry>

Trait Implementations

impl<M> AsRef<Geometry> for GeoShape<M> where
    M: GeoShapeMapping
[src]

impl<M> PartialEq<Geometry> for GeoShape<M> where
    M: GeoShapeMapping
[src]

impl<M> PartialEq<GeoShape<M>> for GeoShape<M> where
    M: PartialEq<M> + GeoShapeMapping
[src]

impl<M> Serialize for GeoShape<M> where
    M: GeoShapeMapping
[src]

Serialize this value into the given Serde serializer. Read more

impl<'de, M> Deserialize<'de> for GeoShape<M> where
    M: GeoShapeMapping
[src]

impl<M> From<Geometry> for GeoShape<M> where
    M: GeoShapeMapping
[src]

Performs the conversion.

impl<M> Deref for GeoShape<M> where
    M: GeoShapeMapping
[src]

The resulting type after dereferencing

The method called to dereference a value

impl<M> GeoShapeFieldType<M> for GeoShape<M> where
    M: GeoShapeMapping
[src]

impl<M> Debug for GeoShape<M> where
    M: Debug + GeoShapeMapping
[src]

Formats the value using the given formatter.

impl<M> Clone for GeoShape<M> where
    M: Clone + GeoShapeMapping
[src]