Struct prayers::PrayerManager[][src]

pub struct PrayerManager { /* fields omitted */ }

The prayer manager

Example

use prayers::*;

let prayer_manager = PrayerManager::new(CalculationMethods::MWL, Some(HightLatMethods::NightMiddle));

let a_date = Utc.ymd(2021, 4, 12);
let a_house = Coordinates(38.8976763, -77.036529, 18.0);
let prayers = prayer_manager.get_times(a_date, a_house);

Implementations

impl PrayerManager[src]

pub fn new(
    method: CalculationMethods,
    high_lats: Option<HightLatMethods>
) -> PrayerManager
[src]

Initialize a PrayerManager

pub fn get_calculation_method(
    calculation_method: CalculationMethods
) -> CalculationMethod
[src]

Get calculation parameters from a CalculationMethods

pub fn get_times(&self, date: Date<Utc>, coords: Coordinates) -> PrayerTimes[src]

Get prayer times for a specific UTC date and coordinates

Example

use prayers::*;

let prayer_manager = PrayerManager::new(CalculationMethods::MWL, Some(HightLatMethods::NightMiddle));

let a_date = Utc.ymd(2021, 4, 12);
let a_house = Coordinates(38.8976763, -77.036529, 18.0);
let prayers = prayer_manager.get_times(a_date, a_house);

Trait Implementations

impl Clone for PrayerManager[src]

impl Copy for PrayerManager[src]

impl Debug for PrayerManager[src]

impl PartialEq<PrayerManager> for PrayerManager[src]

impl StructuralPartialEq for PrayerManager[src]

Auto Trait Implementations

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, 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.