pub enum Zerometry<'a> {
Point(Zoint<'a>),
MultiPoints(ZultiPoints<'a>),
Line(Zine<'a>),
MultiLines(ZultiLines<'a>),
Polygon(Zolygon<'a>),
MultiPolygon(ZultiPolygons<'a>),
Collection(Zollection<'a>),
}Variants§
Point(Zoint<'a>)
MultiPoints(ZultiPoints<'a>)
Line(Zine<'a>)
MultiLines(ZultiLines<'a>)
Polygon(Zolygon<'a>)
MultiPolygon(ZultiPolygons<'a>)
Collection(Zollection<'a>)
Implementations§
Source§impl<'a> Zerometry<'a>
impl<'a> Zerometry<'a>
pub fn from_bytes(data: &'a [u8]) -> Result<Self, Error>
Sourcepub fn write_from_geometry(
writer: &mut Vec<u8>,
geometry: &Geometry<f64>,
) -> Result<(), Error>
pub fn write_from_geometry( writer: &mut Vec<u8>, geometry: &Geometry<f64>, ) -> Result<(), Error>
The Line, Triangle and Rectangle gets converted respectively to Zine and Zolygon
pub fn to_point(&self) -> Option<Zoint<'_>>
pub fn to_multi_points(&self) -> Option<ZultiPoints<'_>>
pub fn to_line(&self) -> Option<Zine<'_>>
pub fn to_zulti_lines(&self) -> Option<ZultiLines<'_>>
pub fn to_polygon(&self) -> Option<Zolygon<'_>>
pub fn to_multi_polygon(&self) -> Option<ZultiPolygons<'_>>
pub fn to_geo(&self) -> Geometry<f64>
Trait Implementations§
Source§impl<'a> From<ZultiPoints<'a>> for Zerometry<'a>
impl<'a> From<ZultiPoints<'a>> for Zerometry<'a>
Source§fn from(points: ZultiPoints<'a>) -> Self
fn from(points: ZultiPoints<'a>) -> Self
Converts to this type from the input type.
Source§impl<'a> From<ZultiPolygons<'a>> for Zerometry<'a>
impl<'a> From<ZultiPolygons<'a>> for Zerometry<'a>
Source§fn from(polygon: ZultiPolygons<'a>) -> Self
fn from(polygon: ZultiPolygons<'a>) -> Self
Converts to this type from the input type.
Source§impl<'a> RelationBetweenShapes<Geometry> for Zerometry<'a>
impl<'a> RelationBetweenShapes<Geometry> for Zerometry<'a>
fn relation( &self, other: &Geometry<f64>, relation: InputRelation, ) -> OutputRelation
fn all_relation(&self, other: &Other) -> OutputRelation
fn any_relation(&self, other: &Other) -> OutputRelation
fn contains(&self, other: &Other) -> bool
fn strict_contains(&self, other: &Other) -> bool
fn contained(&self, other: &Other) -> bool
fn strict_contained(&self, other: &Other) -> bool
fn intersects(&self, other: &Other) -> bool
fn disjoint(&self, other: &Other) -> bool
Source§impl<'a> RelationBetweenShapes<MultiPolygon> for Zerometry<'a>
impl<'a> RelationBetweenShapes<MultiPolygon> for Zerometry<'a>
fn relation( &self, other: &MultiPolygon<f64>, relation: InputRelation, ) -> OutputRelation
fn all_relation(&self, other: &Other) -> OutputRelation
fn any_relation(&self, other: &Other) -> OutputRelation
fn contains(&self, other: &Other) -> bool
fn strict_contains(&self, other: &Other) -> bool
fn contained(&self, other: &Other) -> bool
fn strict_contained(&self, other: &Other) -> bool
fn intersects(&self, other: &Other) -> bool
fn disjoint(&self, other: &Other) -> bool
Source§impl<'a> RelationBetweenShapes<Polygon> for Zerometry<'a>
impl<'a> RelationBetweenShapes<Polygon> for Zerometry<'a>
fn relation( &self, other: &Polygon<f64>, relation: InputRelation, ) -> OutputRelation
fn all_relation(&self, other: &Other) -> OutputRelation
fn any_relation(&self, other: &Other) -> OutputRelation
fn contains(&self, other: &Other) -> bool
fn strict_contains(&self, other: &Other) -> bool
fn contained(&self, other: &Other) -> bool
fn strict_contained(&self, other: &Other) -> bool
fn intersects(&self, other: &Other) -> bool
fn disjoint(&self, other: &Other) -> bool
Source§impl<'a> RelationBetweenShapes<Zerometry<'a>> for Geometry<f64>
impl<'a> RelationBetweenShapes<Zerometry<'a>> for Geometry<f64>
fn relation( &self, other: &Zerometry<'a>, relation: InputRelation, ) -> OutputRelation
fn all_relation(&self, other: &Other) -> OutputRelation
fn any_relation(&self, other: &Other) -> OutputRelation
fn contains(&self, other: &Other) -> bool
fn strict_contains(&self, other: &Other) -> bool
fn contained(&self, other: &Other) -> bool
fn strict_contained(&self, other: &Other) -> bool
fn intersects(&self, other: &Other) -> bool
fn disjoint(&self, other: &Other) -> bool
Source§impl<'a> RelationBetweenShapes<Zerometry<'a>> for Zerometry<'a>
impl<'a> RelationBetweenShapes<Zerometry<'a>> for Zerometry<'a>
fn relation( &self, other: &Zerometry<'_>, relation: InputRelation, ) -> OutputRelation
fn all_relation(&self, other: &Other) -> OutputRelation
fn any_relation(&self, other: &Other) -> OutputRelation
fn contains(&self, other: &Other) -> bool
fn strict_contains(&self, other: &Other) -> bool
fn contained(&self, other: &Other) -> bool
fn strict_contained(&self, other: &Other) -> bool
fn intersects(&self, other: &Other) -> bool
fn disjoint(&self, other: &Other) -> bool
Source§impl<'a> RelationBetweenShapes<Zerometry<'a>> for Zine<'a>
impl<'a> RelationBetweenShapes<Zerometry<'a>> for Zine<'a>
fn relation( &self, other: &Zerometry<'a>, relation: InputRelation, ) -> OutputRelation
fn all_relation(&self, other: &Other) -> OutputRelation
fn any_relation(&self, other: &Other) -> OutputRelation
fn contains(&self, other: &Other) -> bool
fn strict_contains(&self, other: &Other) -> bool
fn contained(&self, other: &Other) -> bool
fn strict_contained(&self, other: &Other) -> bool
fn intersects(&self, other: &Other) -> bool
fn disjoint(&self, other: &Other) -> bool
Source§impl<'a> RelationBetweenShapes<Zerometry<'a>> for Zoint<'a>
impl<'a> RelationBetweenShapes<Zerometry<'a>> for Zoint<'a>
fn relation( &self, other: &Zerometry<'a>, relation: InputRelation, ) -> OutputRelation
fn all_relation(&self, other: &Other) -> OutputRelation
fn any_relation(&self, other: &Other) -> OutputRelation
fn contains(&self, other: &Other) -> bool
fn strict_contains(&self, other: &Other) -> bool
fn contained(&self, other: &Other) -> bool
fn strict_contained(&self, other: &Other) -> bool
fn intersects(&self, other: &Other) -> bool
fn disjoint(&self, other: &Other) -> bool
Source§impl<'a> RelationBetweenShapes<Zerometry<'a>> for Zollection<'a>
impl<'a> RelationBetweenShapes<Zerometry<'a>> for Zollection<'a>
fn relation( &self, other: &Zerometry<'a>, relation: InputRelation, ) -> OutputRelation
fn all_relation(&self, other: &Other) -> OutputRelation
fn any_relation(&self, other: &Other) -> OutputRelation
fn contains(&self, other: &Other) -> bool
fn strict_contains(&self, other: &Other) -> bool
fn contained(&self, other: &Other) -> bool
fn strict_contained(&self, other: &Other) -> bool
fn intersects(&self, other: &Other) -> bool
fn disjoint(&self, other: &Other) -> bool
Source§impl<'a> RelationBetweenShapes<Zerometry<'a>> for Zolygon<'a>
impl<'a> RelationBetweenShapes<Zerometry<'a>> for Zolygon<'a>
fn relation( &self, other: &Zerometry<'a>, relation: InputRelation, ) -> OutputRelation
fn all_relation(&self, other: &Other) -> OutputRelation
fn any_relation(&self, other: &Other) -> OutputRelation
fn contains(&self, other: &Other) -> bool
fn strict_contains(&self, other: &Other) -> bool
fn contained(&self, other: &Other) -> bool
fn strict_contained(&self, other: &Other) -> bool
fn intersects(&self, other: &Other) -> bool
fn disjoint(&self, other: &Other) -> bool
Source§impl<'a> RelationBetweenShapes<Zerometry<'a>> for ZultiLines<'a>
impl<'a> RelationBetweenShapes<Zerometry<'a>> for ZultiLines<'a>
fn relation( &self, other: &Zerometry<'a>, relation: InputRelation, ) -> OutputRelation
fn all_relation(&self, other: &Other) -> OutputRelation
fn any_relation(&self, other: &Other) -> OutputRelation
fn contains(&self, other: &Other) -> bool
fn strict_contains(&self, other: &Other) -> bool
fn contained(&self, other: &Other) -> bool
fn strict_contained(&self, other: &Other) -> bool
fn intersects(&self, other: &Other) -> bool
fn disjoint(&self, other: &Other) -> bool
Source§impl<'a> RelationBetweenShapes<Zerometry<'a>> for ZultiPoints<'a>
impl<'a> RelationBetweenShapes<Zerometry<'a>> for ZultiPoints<'a>
fn relation( &self, other: &Zerometry<'a>, relation: InputRelation, ) -> OutputRelation
fn all_relation(&self, other: &Other) -> OutputRelation
fn any_relation(&self, other: &Other) -> OutputRelation
fn contains(&self, other: &Other) -> bool
fn strict_contains(&self, other: &Other) -> bool
fn contained(&self, other: &Other) -> bool
fn strict_contained(&self, other: &Other) -> bool
fn intersects(&self, other: &Other) -> bool
fn disjoint(&self, other: &Other) -> bool
Source§impl<'a> RelationBetweenShapes<Zerometry<'a>> for ZultiPolygons<'a>
impl<'a> RelationBetweenShapes<Zerometry<'a>> for ZultiPolygons<'a>
fn relation( &self, other: &Zerometry<'_>, relation: InputRelation, ) -> OutputRelation
fn all_relation(&self, other: &Other) -> OutputRelation
fn any_relation(&self, other: &Other) -> OutputRelation
fn contains(&self, other: &Other) -> bool
fn strict_contains(&self, other: &Other) -> bool
fn contained(&self, other: &Other) -> bool
fn strict_contained(&self, other: &Other) -> bool
fn intersects(&self, other: &Other) -> bool
fn disjoint(&self, other: &Other) -> bool
Source§impl<'a> RelationBetweenShapes<Zine<'a>> for Zerometry<'a>
impl<'a> RelationBetweenShapes<Zine<'a>> for Zerometry<'a>
fn relation(&self, other: &Zine<'_>, relation: InputRelation) -> OutputRelation
fn all_relation(&self, other: &Other) -> OutputRelation
fn any_relation(&self, other: &Other) -> OutputRelation
fn contains(&self, other: &Other) -> bool
fn strict_contains(&self, other: &Other) -> bool
fn contained(&self, other: &Other) -> bool
fn strict_contained(&self, other: &Other) -> bool
fn intersects(&self, other: &Other) -> bool
fn disjoint(&self, other: &Other) -> bool
Source§impl<'a> RelationBetweenShapes<Zoint<'a>> for Zerometry<'a>
impl<'a> RelationBetweenShapes<Zoint<'a>> for Zerometry<'a>
fn relation(&self, other: &Zoint<'_>, relation: InputRelation) -> OutputRelation
fn all_relation(&self, other: &Other) -> OutputRelation
fn any_relation(&self, other: &Other) -> OutputRelation
fn contains(&self, other: &Other) -> bool
fn strict_contains(&self, other: &Other) -> bool
fn contained(&self, other: &Other) -> bool
fn strict_contained(&self, other: &Other) -> bool
fn intersects(&self, other: &Other) -> bool
fn disjoint(&self, other: &Other) -> bool
Source§impl<'a> RelationBetweenShapes<Zollection<'a>> for Zerometry<'a>
impl<'a> RelationBetweenShapes<Zollection<'a>> for Zerometry<'a>
fn relation( &self, other: &Zollection<'_>, relation: InputRelation, ) -> OutputRelation
fn all_relation(&self, other: &Other) -> OutputRelation
fn any_relation(&self, other: &Other) -> OutputRelation
fn contains(&self, other: &Other) -> bool
fn strict_contains(&self, other: &Other) -> bool
fn contained(&self, other: &Other) -> bool
fn strict_contained(&self, other: &Other) -> bool
fn intersects(&self, other: &Other) -> bool
fn disjoint(&self, other: &Other) -> bool
Source§impl<'a> RelationBetweenShapes<Zolygon<'a>> for Zerometry<'a>
impl<'a> RelationBetweenShapes<Zolygon<'a>> for Zerometry<'a>
fn relation( &self, other: &Zolygon<'_>, relation: InputRelation, ) -> OutputRelation
fn all_relation(&self, other: &Other) -> OutputRelation
fn any_relation(&self, other: &Other) -> OutputRelation
fn contains(&self, other: &Other) -> bool
fn strict_contains(&self, other: &Other) -> bool
fn contained(&self, other: &Other) -> bool
fn strict_contained(&self, other: &Other) -> bool
fn intersects(&self, other: &Other) -> bool
fn disjoint(&self, other: &Other) -> bool
Source§impl<'a> RelationBetweenShapes<ZultiLines<'a>> for Zerometry<'a>
impl<'a> RelationBetweenShapes<ZultiLines<'a>> for Zerometry<'a>
fn relation( &self, other: &ZultiLines<'_>, relation: InputRelation, ) -> OutputRelation
fn all_relation(&self, other: &Other) -> OutputRelation
fn any_relation(&self, other: &Other) -> OutputRelation
fn contains(&self, other: &Other) -> bool
fn strict_contains(&self, other: &Other) -> bool
fn contained(&self, other: &Other) -> bool
fn strict_contained(&self, other: &Other) -> bool
fn intersects(&self, other: &Other) -> bool
fn disjoint(&self, other: &Other) -> bool
Source§impl<'a> RelationBetweenShapes<ZultiPoints<'a>> for Zerometry<'a>
impl<'a> RelationBetweenShapes<ZultiPoints<'a>> for Zerometry<'a>
fn relation( &self, other: &ZultiPoints<'_>, relation: InputRelation, ) -> OutputRelation
fn all_relation(&self, other: &Other) -> OutputRelation
fn any_relation(&self, other: &Other) -> OutputRelation
fn contains(&self, other: &Other) -> bool
fn strict_contains(&self, other: &Other) -> bool
fn contained(&self, other: &Other) -> bool
fn strict_contained(&self, other: &Other) -> bool
fn intersects(&self, other: &Other) -> bool
fn disjoint(&self, other: &Other) -> bool
Source§impl<'a> RelationBetweenShapes<ZultiPolygons<'a>> for Zerometry<'a>
impl<'a> RelationBetweenShapes<ZultiPolygons<'a>> for Zerometry<'a>
fn relation( &self, other: &ZultiPolygons<'_>, relation: InputRelation, ) -> OutputRelation
fn all_relation(&self, other: &Other) -> OutputRelation
fn any_relation(&self, other: &Other) -> OutputRelation
fn contains(&self, other: &Other) -> bool
fn strict_contains(&self, other: &Other) -> bool
fn contained(&self, other: &Other) -> bool
fn strict_contained(&self, other: &Other) -> bool
fn intersects(&self, other: &Other) -> bool
fn disjoint(&self, other: &Other) -> bool
impl<'a> Copy for Zerometry<'a>
Auto Trait Implementations§
impl<'a> Freeze for Zerometry<'a>
impl<'a> RefUnwindSafe for Zerometry<'a>
impl<'a> Send for Zerometry<'a>
impl<'a> Sync for Zerometry<'a>
impl<'a> Unpin for Zerometry<'a>
impl<'a> UnwindSafe for Zerometry<'a>
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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