Struct rsgeo::prelude::RecArea [−][src]
pub struct RecArea { /* fields omitted */ }
represent a rectangle area
Implementations
impl RecArea
[src]
pub fn new(
min_lat: f32,
max_lat: f32,
min_long: f32,
max_long: f32
) -> Result<Self, &'static str>
[src]
min_lat: f32,
max_lat: f32,
min_long: f32,
max_long: f32
) -> Result<Self, &'static str>
Create a new RecArea.The latitude and longitude should be valid,otherwise.
Trait Implementations
impl Area for RecArea
[src]
fn contains(&self, p: &Point) -> bool
[src]
judge if a point in a rectangle area
Example
use rsgeo::prelude::{RecArea,Point,Area}; let ra = RecArea::new(35.0, 36.0, 110.0, 115.0).unwrap(); let pa = Point::new(32.0,112.0).unwrap(); let pb = Point::new(35.1,112.0).unwrap(); assert!(!ra.contains(&pa)); assert!(ra.contains(&pb));
impl Debug for RecArea
[src]
Auto Trait Implementations
impl RefUnwindSafe for RecArea
impl Send for RecArea
impl Sync for RecArea
impl Unpin for RecArea
impl UnwindSafe for RecArea
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,