[][src]Struct solnedgang::SunriseSunsetCalculator

pub struct SunriseSunsetCalculator {
    pub latitude: f64,
    pub longitude: f64,
}

Fields

latitude: f64

The latitude for the position for which the time should be calculated for.

longitude: f64

The longitude for the position for which the time should be calculated for.

Methods

impl SunriseSunsetCalculator[src]

pub fn calc_sunrise_utc(&self, date: DateTime<Utc>) -> f64[src]

Calculates the the time for the sunrise in minutes from midnight (UTC).

Arguments

  • date - The date for which the sunrise time should be calculated for.

pub fn calc_sunset_utc(&self, date: DateTime<Utc>) -> f64[src]

Calculates the the time for the sunset in minutes from midnight (UTC).

Arguments

  • date - The date for which the sunset time should be calculated for.

Auto Trait Implementations

Blanket Implementations

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

impl<T, U> Into<U> for T where
    U: From<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]