[−][src]Struct s2::rect::Rect
Fields
lat: Interval
lng: Interval
Methods
impl Rect
[src]
pub fn empty() -> Rect
[src]
pub fn full() -> Rect
[src]
pub fn from_center_size(center: LatLng, size: LatLng) -> Self
[src]
pub fn is_valid(&self) -> bool
[src]
pub fn is_empty(&self) -> bool
[src]
pub fn is_full(&self) -> bool
[src]
pub fn is_point(&self) -> bool
[src]
pub fn vertex(&self, i: u8) -> LatLng
[src]
pub fn lo(&self) -> LatLng
[src]
pub fn hi(&self) -> LatLng
[src]
pub fn center(&self) -> LatLng
[src]
pub fn size(&self) -> LatLng
[src]
pub fn area(&self) -> f64
[src]
pub fn expanded(&self, margin: &LatLng) -> Self
[src]
pub fn polar_closure(&self) -> Self
[src]
pub fn union(&self, other: &Self) -> Self
[src]
pub fn intersection(&self, other: &Self) -> Self
[src]
pub fn intersects(&self, other: &Rect) -> bool
[src]
pub fn approx_eq(&self, other: &Self) -> bool
[src]
impl Rect
[src]
pub fn contains(&self, other: &Self) -> bool
[src]
contains reports whether this Rect contains the other Rect.
pub fn contains_latlng(&self, ll: &LatLng) -> bool
[src]
contains_latlng reports whether the given LatLng is within the Rect.
pub fn contains_point(&self, p: &Point) -> bool
[src]
contains_point reports whether the given Point is within the Rect.
Trait Implementations
impl Region for Rect
[src]
fn cap_bound(&self) -> Cap
[src]
cap_bound returns a cap that countains Rect.
fn rect_bound(&self) -> Rect
[src]
rect_bound returns itself.
fn contains_cell(&self, c: &Cell) -> bool
[src]
contains_cell reports whether the given Cell is contained by this Rect.
fn intersects_cell(&self, cell: &Cell) -> bool
[src]
fn cell_union_bound(&self) -> Vec<CellID>
[src]
impl Clone for Rect
[src]
fn clone(&self) -> Rect
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl From<LatLng> for Rect
[src]
impl Debug for Rect
[src]
impl<'a, 'b> Add<&'a LatLng> for &'b Rect
[src]
Auto Trait Implementations
Blanket Implementations
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From<T> for T
[src]
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.
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>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,