Struct Geom

Source
pub struct Geom {
    pub geom: Geometry,
}
Expand description

The Geom struct is the backbone of sfconversions. It provides an itermediary between extendr and geo / geo_types as required by the orphan rule.

Fields§

§geom: Geometry

a single field containing a geo_types Geometry enum

Implementations§

Source§

impl Geom

Source

pub fn print(&self) -> String

Trait Implementations§

Source§

impl Clone for Geom

Source§

fn clone(&self) -> Geom

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Geom

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl From<Geom> for LineString

Source§

fn from(geom: Geom) -> Self

Converts to this type from the input type.
Source§

impl From<Geom> for Point

Source§

fn from(geom: Geom) -> Self

Converts to this type from the input type.
Source§

impl From<Geom> for Polygon

Source§

fn from(geom: Geom) -> Self

Converts to this type from the input type.
Source§

impl From<Geom> for Robj

Source§

fn from(value: Geom) -> Self

Converts to this type from the input type.
Source§

impl From<Geometry> for Geom

Convert a Geometry enum to a Geom struct

Source§

fn from(geo: Geometry) -> Self

Converts to this type from the input type.
Source§

impl From<Line> for Geom

Source§

fn from(l: Line) -> Self

Converts to this type from the input type.
Source§

impl From<LineString> for Geom

Source§

fn from(lns: LineString) -> Self

Converts to this type from the input type.
Source§

impl From<MultiLineString> for Geom

Source§

fn from(lns: MultiLineString) -> Self

Converts to this type from the input type.
Source§

impl From<MultiPoint> for Geom

Source§

fn from(pnt: MultiPoint) -> Self

Converts to this type from the input type.
Source§

impl From<MultiPolygon> for Geom

Source§

fn from(poly: MultiPolygon) -> Self

Converts to this type from the input type.
Source§

impl From<Point> for Geom

Source§

fn from(pnt: Point) -> Self

Converts to this type from the input type.
Source§

impl From<Polygon> for Geom

Source§

fn from(poly: Polygon) -> Self

Converts to this type from the input type.
Source§

impl From<Rect> for Geom

Source§

fn from(r: Rect) -> Self

Converts to this type from the input type.
Source§

impl From<Robj> for Geom

extendr does not permit taking ownership of the pointers it creates for structs. This impl clones the struct to create an owned struct.

Source§

fn from(robj: Robj) -> Self

Converts to this type from the input type.
Source§

impl RTreeObject for Geom

Implement RTreeObject for Geom

Source§

type Envelope = AABB<[f64; 2]>

The object’s envelope type. Usually, AABB will be the right choice. This type also defines the object’s dimensionality.
Source§

fn envelope(&self) -> Self::Envelope

Returns the object’s envelope. Read more
Source§

impl TryFrom<&Robj> for &Geom

Source§

type Error = Error

The type returned in the event of a conversion error.
Source§

fn try_from(robj: &Robj) -> Result<Self>

Performs the conversion.
Source§

impl TryFrom<&mut Robj> for &mut Geom

Source§

type Error = Error

The type returned in the event of a conversion error.
Source§

fn try_from(robj: &mut Robj) -> Result<Self>

Performs the conversion.
Source§

impl TryFrom<Robj> for &Geom

Source§

type Error = Error

The type returned in the event of a conversion error.
Source§

fn try_from(robj: Robj) -> Result<Self>

Performs the conversion.
Source§

impl TryFrom<Robj> for &mut Geom

Source§

type Error = Error

The type returned in the event of a conversion error.
Source§

fn try_from(robj: Robj) -> Result<Self>

Performs the conversion.

Auto Trait Implementations§

§

impl Freeze for Geom

§

impl RefUnwindSafe for Geom

§

impl Send for Geom

§

impl Sync for Geom

§

impl Unpin for Geom

§

impl UnwindSafe for Geom

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

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
Source§

impl<T> IntoGeom for T
where Geom: From<T>,

Source§

impl<T> IntoRobj for T
where Robj: From<T>,

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<G1, G2> Within<G2> for G1
where G2: Contains<G1>,

Source§

fn is_within(&self, b: &G2) -> bool