pub struct PrayerParams {
pub fajr_angle: f64,
pub imsak_buffer_minutes: i64,
pub ihtiyat_minutes: i64,
pub rounding_granularity_seconds: i64,
}Expand description
Prayer time calculation parameters.
Controls angles and buffers used for prayer time calculations.
Fields§
§fajr_angle: f64Sun altitude angle for Fajr (degrees below horizon). Default: -20.0 (MABIMS/Indonesia)
imsak_buffer_minutes: i64Minutes to subtract from Fajr for Imsak. Default: 10
ihtiyat_minutes: i64Safety margin (Ihtiyat) added to all prayer times. Default: 2 minutes
rounding_granularity_seconds: i64Seconds to round prayer times to. Default: 60 (round to next minute)
Implementations§
Source§impl PrayerParams
impl PrayerParams
Sourcepub fn new(fajr_angle: f64, imsak_buffer_minutes: i64) -> Self
pub fn new(fajr_angle: f64, imsak_buffer_minutes: i64) -> Self
Creates new prayer parameters with defaults for Ihtiyat (2m) and rounding (60s).
Sourcepub fn with_ihtiyat(self, minutes: i64) -> Self
pub fn with_ihtiyat(self, minutes: i64) -> Self
Set Ihtiyat (safety margin) in minutes.
Sourcepub fn with_rounding(self, seconds: i64) -> Self
pub fn with_rounding(self, seconds: i64) -> Self
Set rounding granularity in seconds.
Sourcepub fn umm_al_qura() -> Self
pub fn umm_al_qura() -> Self
Umm Al-Qura (Saudi Arabia) standard (-18.5°, 10 min).
Trait Implementations§
Source§impl Clone for PrayerParams
impl Clone for PrayerParams
Source§fn clone(&self) -> PrayerParams
fn clone(&self) -> PrayerParams
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 PrayerParams
impl Debug for PrayerParams
Source§impl Default for PrayerParams
impl Default for PrayerParams
Source§impl<'de> Deserialize<'de> for PrayerParams
impl<'de> Deserialize<'de> for PrayerParams
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for PrayerParams
impl PartialEq for PrayerParams
Source§impl Serialize for PrayerParams
impl Serialize for PrayerParams
impl Copy for PrayerParams
impl StructuralPartialEq for PrayerParams
Auto Trait Implementations§
impl Freeze for PrayerParams
impl RefUnwindSafe for PrayerParams
impl Send for PrayerParams
impl Sync for PrayerParams
impl Unpin for PrayerParams
impl UnwindSafe for PrayerParams
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