pub struct MinimumBoundingRectangle {
pub min_x: f64,
pub min_y: f64,
pub max_x: f64,
pub max_y: f64,
}Expand description
Parsed Minimum Bounding Rectangle from an R-tree record.
§Examples
use idb::innodb::rtree::MinimumBoundingRectangle;
use byteorder::{BigEndian, ByteOrder};
let mut buf = vec![0u8; 32];
BigEndian::write_f64(&mut buf[0..], 1.0);
BigEndian::write_f64(&mut buf[8..], 2.0);
BigEndian::write_f64(&mut buf[16..], 3.0);
BigEndian::write_f64(&mut buf[24..], 4.0);
let mbr = MinimumBoundingRectangle::parse(&buf).unwrap();
assert_eq!(mbr.min_x, 1.0);
assert_eq!(mbr.min_y, 2.0);
assert_eq!(mbr.max_x, 3.0);
assert_eq!(mbr.max_y, 4.0);Fields§
§min_x: f64§min_y: f64§max_x: f64§max_y: f64Implementations§
Source§impl MinimumBoundingRectangle
impl MinimumBoundingRectangle
Sourcepub fn enclosing(
mbrs: &[MinimumBoundingRectangle],
) -> Option<MinimumBoundingRectangle>
pub fn enclosing( mbrs: &[MinimumBoundingRectangle], ) -> Option<MinimumBoundingRectangle>
Returns the overall MBR that encloses all given MBRs.
Trait Implementations§
Source§impl Clone for MinimumBoundingRectangle
impl Clone for MinimumBoundingRectangle
Source§fn clone(&self) -> MinimumBoundingRectangle
fn clone(&self) -> MinimumBoundingRectangle
Returns a duplicate 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 Debug for MinimumBoundingRectangle
impl Debug for MinimumBoundingRectangle
Auto Trait Implementations§
impl Freeze for MinimumBoundingRectangle
impl RefUnwindSafe for MinimumBoundingRectangle
impl Send for MinimumBoundingRectangle
impl Sync for MinimumBoundingRectangle
impl Unpin for MinimumBoundingRectangle
impl UnsafeUnpin for MinimumBoundingRectangle
impl UnwindSafe for MinimumBoundingRectangle
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