Struct geod_types::Longitude[][src]

pub struct Longitude<A: Angle>(_);

The angle measured on the equatorial plane between the meridian of the point and the prime meridian (Greenwich, UK). Read more.

Implementations

impl<A: Angle> Longitude<A>[src]

pub fn east<T>(to_angle: T) -> Result<Self, A::NumErr> where
    T: TryInto<A, Error = A::NumErr>, 
[src]

Construct an eastern longitude with some numeric information.

Errors

  • cannot construct an angle from the given information (overflow of some kind)
  • the constructed angle is more than the straight angle. Valid longitude is in the range 0 <= lon <= 180 deg.

pub fn west<T>(to_angle: T) -> Result<Self, A::NumErr> where
    T: TryInto<A, Error = A::NumErr>, 
[src]

Construct a western longitude with some numeric information.

Errors

  • cannot construct an angle from the given information (overflow of some kind)
  • the constructed angle is more than the straight angle. Valid longitude is in the range 0 <= lon <= 180 deg.

pub fn prime() -> Self[src]

The chosen by convention 0-meridian

pub fn anti_meridian() -> Self[src]

The longitude opposite to the prime

pub fn angle(self) -> A[src]

Angle between the longitude and the prime meridian (absolute value of the longitude).

pub fn direction(self) -> Option<RotationalDirection>[src]

In which direction (from the prime) should we move to reach the longitude faster

pub fn opposite(self) -> Self[src]

Diametrically opposite meridian which together with the current one defines the hemisphere (great circle)

Trait Implementations

impl<A: Angle> Add<A> for Longitude<A>[src]

type Output = Self

The resulting type after applying the + operator.

fn add(self, rhs: A) -> Self::Output[src]

Represent the east movement

impl<A: Clone + Angle> Clone for Longitude<A>[src]

impl<A: Copy + Angle> Copy for Longitude<A>[src]

impl<A: Debug + Angle> Debug for Longitude<A>[src]

impl<A: Angle> Default for Longitude<A>[src]

impl<A: Angle> Display for Longitude<A> where
    A: Display
[src]

impl<A: Eq + Angle> Eq for Longitude<A>[src]

impl<A: Angle> FromStr for Longitude<A> where
    A::ParseErr: From<A::NumErr>, 
[src]

type Err = ParseCoordinateError<A::ParseErr>

The associated error which can be returned from parsing.

impl<A: Angle> Neg for Longitude<A>[src]

type Output = Self

The resulting type after applying the - operator.

impl<A: Angle> PartialEq<Longitude<A>> for Longitude<A>[src]

impl<A: Angle> PartialOrd<Longitude<A>> for Longitude<A>[src]

impl<A: Angle> StructuralEq for Longitude<A>[src]

impl<A: Angle> Sub<A> for Longitude<A>[src]

type Output = Self

The resulting type after applying the - operator.

fn sub(self, rhs: A) -> Self::Output[src]

Represent the west movement

impl<A: Angle> Sub<Longitude<A>> for Longitude<A>[src]

type Output = A

The resulting type after applying the - operator.

impl<A: Angle> TryFrom<[i16; 2]> for Longitude<A> where
    Self: TryFrom<[i16; 4], Error = <A as Angle>::NumErr>, 
[src]

type Error = A::NumErr

The type returned in the event of a conversion error.

impl<A: Angle> TryFrom<[i16; 3]> for Longitude<A> where
    Self: TryFrom<[i16; 4], Error = <A as Angle>::NumErr>, 
[src]

type Error = A::NumErr

The type returned in the event of a conversion error.

impl TryFrom<[i16; 4]> for Longitude<AccurateDegree>[src]

type Error = <AccurateDegree as Angle>::NumErr

The type returned in the event of a conversion error.

impl TryFrom<[i16; 4]> for Longitude<DecimalDegree>[src]

type Error = <DecimalDegree as Angle>::NumErr

The type returned in the event of a conversion error.

impl<A: Angle> TryFrom<(i16, u8, u8, u16)> for Longitude<A> where
    A: TryFrom<(u16, u8, u8, u16), Error = <A as Angle>::NumErr>, 
[src]

type Error = A::NumErr

The type returned in the event of a conversion error.

impl<A: Angle> TryFrom<(i16, u8, u8)> for Longitude<A> where
    Self: TryFrom<(i16, u8, u8, u16), Error = <A as Angle>::NumErr>, 
[src]

type Error = A::NumErr

The type returned in the event of a conversion error.

impl<A: Angle> TryFrom<(i16, u8)> for Longitude<A> where
    Self: TryFrom<(i16, u8, u8, u16), Error = <A as Angle>::NumErr>, 
[src]

type Error = A::NumErr

The type returned in the event of a conversion error.

impl<A: Angle> TryFrom<f64> for Longitude<A>[src]

type Error = A::NumErr

The type returned in the event of a conversion error.

impl<A: Angle> TryFrom<i16> for Longitude<A> where
    Self: TryFrom<(i16, u8, u8, u16), Error = <A as Angle>::NumErr>, 
[src]

type Error = A::NumErr

The type returned in the event of a conversion error.

Auto Trait Implementations

impl<A> RefUnwindSafe for Longitude<A> where
    A: RefUnwindSafe

impl<A> Send for Longitude<A> where
    A: Send

impl<A> Sync for Longitude<A> where
    A: Sync

impl<A> Unpin for Longitude<A> where
    A: Unpin

impl<A> UnwindSafe for Longitude<A> where
    A: UnwindSafe

Blanket Implementations

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

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

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

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

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

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

type Owned = T

The resulting type after obtaining ownership.

impl<T> ToString for T where
    T: Display + ?Sized
[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.