Struct shapefile::record::bbox::GenericBBox[][src]

pub struct GenericBBox<PointType> {
    pub max: PointType,
    pub min: PointType,
}

The Bounding Box type used in this crate.

Each shape that is a collection of points have a bounding box associated to it generally accessible using the bbox() method.

Example

use shapefile::{PointM, PolylineM};
let poly = PolylineM::new(vec![
    PointM::new(1.0, 2.0, 13.42),
    PointM::new(2.0, 1.0, 42.3713),
]);

let bbox = poly.bbox();
assert_eq!(bbox.min, PointM::new(1.0, 1.0, 13.42));
assert_eq!(bbox.max, PointM::new(2.0, 2.0, 42.3713));

Fields

max: PointTypemin: PointType

Implementations

impl<PointType: HasXY> GenericBBox<PointType>[src]

pub fn x_range(&self) -> [f64; 2][src]

pub fn y_range(&self) -> [f64; 2][src]

impl<PointType: HasZ> GenericBBox<PointType>[src]

pub fn z_range(&self) -> [f64; 2][src]

impl<PointType: HasM> GenericBBox<PointType>[src]

pub fn m_range(&self) -> [f64; 2][src]

Trait Implementations

impl<PointType: Clone> Clone for GenericBBox<PointType>[src]

impl<PointType: Copy> Copy for GenericBBox<PointType>[src]

impl<PointType: Debug> Debug for GenericBBox<PointType>[src]

impl<PointType: Default> Default for GenericBBox<PointType>[src]

impl<PointType: PartialEq> PartialEq<GenericBBox<PointType>> for GenericBBox<PointType>[src]

impl<PointType> StructuralPartialEq for GenericBBox<PointType>[src]

Auto Trait Implementations

impl<PointType> RefUnwindSafe for GenericBBox<PointType> where
    PointType: RefUnwindSafe

impl<PointType> Send for GenericBBox<PointType> where
    PointType: Send

impl<PointType> Sync for GenericBBox<PointType> where
    PointType: Sync

impl<PointType> Unpin for GenericBBox<PointType> where
    PointType: Unpin

impl<PointType> UnwindSafe for GenericBBox<PointType> where
    PointType: UnwindSafe

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.