pub struct BoundingBox {
pub south_west: GeographicCoordinate,
pub north_east: GeographicCoordinate,
}Expand description
Rectangular area between a south-west and a north-east corner.
Boxes never span the antimeridian in this model; integrators needing a crossing region encode it as two adjacent boxes.
Fields§
§south_west: GeographicCoordinateSouth-west corner (minimum latitude and longitude).
north_east: GeographicCoordinateNorth-east corner (maximum latitude and longitude).
Implementations§
Source§impl BoundingBox
impl BoundingBox
Sourcepub fn from_corners(
south_west: GeographicCoordinate,
north_east: GeographicCoordinate,
) -> Result<Self, SDKError>
pub fn from_corners( south_west: GeographicCoordinate, north_east: GeographicCoordinate, ) -> Result<Self, SDKError>
Builds a bounding box, rejecting corners that are inverted or outside canonical coordinate ranges.
Sourcepub fn contains_coordinate(&self, coordinate: &GeographicCoordinate) -> bool
pub fn contains_coordinate(&self, coordinate: &GeographicCoordinate) -> bool
Reports whether the coordinate lies within the closed box.
Trait Implementations§
Source§impl Clone for BoundingBox
impl Clone for BoundingBox
Source§fn clone(&self) -> BoundingBox
fn clone(&self) -> BoundingBox
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for BoundingBox
Source§impl Debug for BoundingBox
impl Debug for BoundingBox
Source§impl<'de> Deserialize<'de> for BoundingBox
impl<'de> Deserialize<'de> for BoundingBox
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for BoundingBox
impl PartialEq for BoundingBox
Source§impl Serialize for BoundingBox
impl Serialize for BoundingBox
impl StructuralPartialEq for BoundingBox
Auto Trait Implementations§
impl Freeze for BoundingBox
impl RefUnwindSafe for BoundingBox
impl Send for BoundingBox
impl Sync for BoundingBox
impl Unpin for BoundingBox
impl UnsafeUnpin for BoundingBox
impl UnwindSafe for BoundingBox
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