pub struct PrayerManager { /* private fields */ }
Expand description
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§
Source§impl PrayerManager
impl PrayerManager
Sourcepub fn new(
method: CalculationMethods,
high_lats: Option<HightLatMethods>,
) -> PrayerManager
pub fn new( method: CalculationMethods, high_lats: Option<HightLatMethods>, ) -> PrayerManager
Initialize a PrayerManager
Sourcepub fn get_calculation_method(
calculation_method: CalculationMethods,
) -> CalculationMethod
pub fn get_calculation_method( calculation_method: CalculationMethods, ) -> CalculationMethod
Get calculation parameters from a CalculationMethods
Sourcepub fn get_times(&self, date: Date<Utc>, coords: Coordinates) -> PrayerTimes
pub fn get_times(&self, date: Date<Utc>, coords: Coordinates) -> PrayerTimes
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§
Source§impl Clone for PrayerManager
impl Clone for PrayerManager
Source§fn clone(&self) -> PrayerManager
fn clone(&self) -> PrayerManager
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for PrayerManager
impl Debug for PrayerManager
Source§impl PartialEq for PrayerManager
impl PartialEq for PrayerManager
impl Copy for PrayerManager
impl StructuralPartialEq for PrayerManager
Auto Trait Implementations§
impl Freeze for PrayerManager
impl RefUnwindSafe for PrayerManager
impl Send for PrayerManager
impl Sync for PrayerManager
impl Unpin for PrayerManager
impl UnwindSafe for PrayerManager
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more