[−][src]Struct elastic_types::geo::shape::GeoShape
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<TMapping> GeoShape<TMapping> where
TMapping: GeoShapeMapping,
[src]
TMapping: GeoShapeMapping,
pub fn new<I>(geo: I) -> GeoShape<TMapping> where
I: Into<Geometry>,
[src]
I: Into<Geometry>,
Creates a new GeoShape
from the given Geometry
.
This function will consume the provided Geometry
.
Examples
use geojson::{ Geometry, Value }; let point: GeoShape<DefaultGeoShapeMapping> = GeoShape::new( Geometry::new( Value::Point(vec![ 1.0, 1.0 ]) ) );
pub fn remap<TNewMapping>(shape: GeoShape<TMapping>) -> GeoShape<TNewMapping> where
TNewMapping: GeoShapeMapping,
[src]
TNewMapping: GeoShapeMapping,
Change the mapping of this geo shape.
Methods from Deref<Target = Geometry>
Trait Implementations
impl<TMapping> GeoShapeFieldType<TMapping> for GeoShape<TMapping> where
TMapping: GeoShapeMapping,
[src]
TMapping: GeoShapeMapping,
impl<TMapping: PartialEq> PartialEq<GeoShape<TMapping>> for GeoShape<TMapping> where
TMapping: GeoShapeMapping,
[src]
TMapping: GeoShapeMapping,
fn eq(&self, other: &GeoShape<TMapping>) -> bool
[src]
fn ne(&self, other: &GeoShape<TMapping>) -> bool
[src]
impl<M> PartialEq<Geometry> for GeoShape<M> where
M: GeoShapeMapping,
[src]
M: GeoShapeMapping,
impl<M> PartialEq<GeoShape<M>> for Geometry where
M: GeoShapeMapping,
[src]
M: GeoShapeMapping,
impl<M> From<Geometry> for GeoShape<M> where
M: GeoShapeMapping,
[src]
M: GeoShapeMapping,
impl<TMapping: Clone> Clone for GeoShape<TMapping> where
TMapping: GeoShapeMapping,
[src]
TMapping: GeoShapeMapping,
fn clone(&self) -> GeoShape<TMapping>
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl<M> Deref for GeoShape<M> where
M: GeoShapeMapping,
[src]
M: GeoShapeMapping,
impl<TMapping: Debug> Debug for GeoShape<TMapping> where
TMapping: GeoShapeMapping,
[src]
TMapping: GeoShapeMapping,
impl<M> Borrow<Geometry> for GeoShape<M> where
M: GeoShapeMapping,
[src]
M: GeoShapeMapping,
impl<TMapping> Serialize for GeoShape<TMapping> where
TMapping: GeoShapeMapping,
[src]
TMapping: GeoShapeMapping,
impl<'de, TMapping> Deserialize<'de> for GeoShape<TMapping> where
TMapping: GeoShapeMapping,
[src]
TMapping: GeoShapeMapping,
fn deserialize<D>(deserializer: D) -> Result<GeoShape<TMapping>, D::Error> where
D: Deserializer<'de>,
[src]
D: Deserializer<'de>,
Auto Trait Implementations
impl<TMapping> Send for GeoShape<TMapping> where
TMapping: Send,
TMapping: Send,
impl<TMapping> Sync for GeoShape<TMapping> where
TMapping: Sync,
TMapping: Sync,
Blanket Implementations
impl<T, U> Into for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T> From for T
[src]
impl<T, U> TryFrom for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T> Borrow for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> DeserializeOwned for T where
T: Deserialize<'de>,
[src]
T: Deserialize<'de>,
impl<T> Same for T
type Output = T
Should always be Self
impl<SS, SP> SupersetOf for SP where
SS: SubsetOf<SP>,
SS: SubsetOf<SP>,