Struct shapefile::record::bbox::GenericBBox
source · pub struct GenericBBox<PointType> {
pub max: PointType,
pub min: PointType,
}
Expand description
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: PointType
§min: PointType
Implementations§
source§impl<PointType: HasXY> GenericBBox<PointType>
impl<PointType: HasXY> GenericBBox<PointType>
Trait Implementations§
source§impl<PointType: Clone> Clone for GenericBBox<PointType>
impl<PointType: Clone> Clone for GenericBBox<PointType>
source§fn clone(&self) -> GenericBBox<PointType>
fn clone(&self) -> GenericBBox<PointType>
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl<PointType: Debug> Debug for GenericBBox<PointType>
impl<PointType: Debug> Debug for GenericBBox<PointType>
source§impl<PointType: Default> Default for GenericBBox<PointType>
impl<PointType: Default> Default for GenericBBox<PointType>
source§impl<PointType: PartialEq> PartialEq for GenericBBox<PointType>
impl<PointType: PartialEq> PartialEq for GenericBBox<PointType>
source§fn eq(&self, other: &GenericBBox<PointType>) -> bool
fn eq(&self, other: &GenericBBox<PointType>) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl<PointType: Copy> Copy for GenericBBox<PointType>
impl<PointType> StructuralPartialEq for GenericBBox<PointType>
Auto Trait Implementations§
impl<PointType> Freeze for GenericBBox<PointType>where
PointType: Freeze,
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§
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