pub enum MonotoneChainGeometry<'a, T: GeoNum> {
LineString(MonotoneChainLineString<'a, T>),
MultiLineString(MonotoneChainMultiLineString<'a, T>),
Polygon(MonotoneChainPolygon<'a, T>),
MultiPolygon(MonotoneChainMultiPolygon<'a, T>),
}Expand description
An enum representing any possible geometry type backed by MonotoneChain.
§Example
use std::convert::TryFrom;
use geo::{LineString, line_string, MonotoneChainGeometry, Geometry};
let ls: LineString<f64> = line_string![(x: 0., y: 0.), (x: 10., y: 10.)];
let pe: Geometry = ls.into();
let lg: MonotoneChainGeometry<f64> = (&pe).try_into().expect("failed to convert");Variants§
LineString(MonotoneChainLineString<'a, T>)
MultiLineString(MonotoneChainMultiLineString<'a, T>)
Polygon(MonotoneChainPolygon<'a, T>)
MultiPolygon(MonotoneChainMultiPolygon<'a, T>)
Trait Implementations§
Source§impl<'a, T> BoundingRect<T> for MonotoneChainGeometry<'a, T>where
T: GeoNum,
impl<'a, T> BoundingRect<T> for MonotoneChainGeometry<'a, T>where
T: GeoNum,
Source§impl<'a, G, T> Intersects<G> for MonotoneChainGeometry<'a, T>where
G: Intersects<MonotoneChainLineString<'a, T>> + Intersects<MonotoneChainMultiLineString<'a, T>> + Intersects<MonotoneChainPolygon<'a, T>> + Intersects<MonotoneChainMultiPolygon<'a, T>>,
T: GeoNum + 'a,
impl<'a, G, T> Intersects<G> for MonotoneChainGeometry<'a, T>where
G: Intersects<MonotoneChainLineString<'a, T>> + Intersects<MonotoneChainMultiLineString<'a, T>> + Intersects<MonotoneChainPolygon<'a, T>> + Intersects<MonotoneChainMultiPolygon<'a, T>>,
T: GeoNum + 'a,
fn intersects(&self, rhs: &G) -> bool
Source§impl<'a, T> Intersects<MonotoneChainGeometry<'a, T>> for MonotoneChainLineString<'a, T>
impl<'a, T> Intersects<MonotoneChainGeometry<'a, T>> for MonotoneChainLineString<'a, T>
fn intersects(&self, rhs: &MonotoneChainGeometry<'a, T>) -> bool
Source§impl<'a, T> Intersects<MonotoneChainGeometry<'a, T>> for MonotoneChainMultiLineString<'a, T>
impl<'a, T> Intersects<MonotoneChainGeometry<'a, T>> for MonotoneChainMultiLineString<'a, T>
fn intersects(&self, rhs: &MonotoneChainGeometry<'a, T>) -> bool
Source§impl<'a, T> Intersects<MonotoneChainGeometry<'a, T>> for MonotoneChainMultiPolygon<'a, T>
impl<'a, T> Intersects<MonotoneChainGeometry<'a, T>> for MonotoneChainMultiPolygon<'a, T>
fn intersects(&self, rhs: &MonotoneChainGeometry<'a, T>) -> bool
Source§impl<'a, T> Intersects<MonotoneChainGeometry<'a, T>> for MonotoneChainPolygon<'a, T>
impl<'a, T> Intersects<MonotoneChainGeometry<'a, T>> for MonotoneChainPolygon<'a, T>
fn intersects(&self, rhs: &MonotoneChainGeometry<'a, T>) -> bool
Auto Trait Implementations§
impl<'a, T> Freeze for MonotoneChainGeometry<'a, T>where
T: Freeze,
impl<'a, T> RefUnwindSafe for MonotoneChainGeometry<'a, T>where
T: RefUnwindSafe,
impl<'a, T> Send for MonotoneChainGeometry<'a, T>
impl<'a, T> Sync for MonotoneChainGeometry<'a, T>where
T: Sync,
impl<'a, T> Unpin for MonotoneChainGeometry<'a, T>where
T: Unpin,
impl<'a, T> UnsafeUnpin for MonotoneChainGeometry<'a, T>where
T: UnsafeUnpin,
impl<'a, T> UnwindSafe for MonotoneChainGeometry<'a, T>where
T: UnwindSafe + RefUnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more