[][src]Struct s2::rect::Rect

pub struct Rect {
    pub lat: Interval,
    pub lng: Interval,
}

Fields

lat: Intervallng: 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 cell_union_bound(&self) -> Vec<CellID>[src]

impl Clone for 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]

type Output = Rect

The resulting type after applying the + operator.

Auto Trait Implementations

impl Send for Rect

impl Sync for Rect

Blanket Implementations

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]