pub struct Parameters {
pub method: Method,
pub fajr_angle: f64,
pub maghrib_angle: f64,
pub isha_angle: f64,
pub isha_interval: i32,
pub madhab: Madhab,
pub high_latitude_rule: HighLatitudeRule,
pub polar_fallback: PolarFallback,
pub adjustments: TimeAdjustment,
pub method_adjustments: TimeAdjustment,
pub rounding: Rounding,
pub shafaq: Shafaq,
}Expand description
Settings that determine prayer time calculation: angles, method, madhab, high-latitude rule, rounding, polar fallback, and adjustments.
Use Configuration to build a Parameters value ergonomically.
Fields§
§method: Method§fajr_angle: f64§maghrib_angle: f64§isha_angle: f64§isha_interval: i32§madhab: Madhab§high_latitude_rule: HighLatitudeRule§polar_fallback: PolarFallback§adjustments: TimeAdjustment§method_adjustments: TimeAdjustment§rounding: Rounding§shafaq: ShafaqImplementations§
Source§impl Parameters
impl Parameters
Sourcepub fn new(fajr_angle: f64, isha_angle: f64) -> Parameters
pub fn new(fajr_angle: f64, isha_angle: f64) -> Parameters
Create Parameters from Fajr and Isha angles, with defaults
for all other fields. Prefer Configuration for building.
Sourcepub fn night_portions(&self) -> (f64, f64)
pub fn night_portions(&self) -> (f64, f64)
Return the night-portion fractions (fajr, isha) determined by the
active HighLatitudeRule.
MiddleOfTheNight → (0.5, 0.5)
SeventhOfTheNight → (1/7, 1/7)
TwilightAngle → (fajr_angle/60, isha_angle/60)
LocalRelativeEstimation(pct) → (pct, pct)
Sourcepub fn time_adjustments(&self, prayer: Prayer) -> i64
pub fn time_adjustments(&self, prayer: Prayer) -> i64
Return the combined (user + method) time adjustment in minutes
for the given Prayer.
Trait Implementations§
Source§impl Clone for Parameters
impl Clone for Parameters
Source§fn clone(&self) -> Parameters
fn clone(&self) -> Parameters
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for Parameters
Source§impl Debug for Parameters
impl Debug for Parameters
Source§impl PartialEq for Parameters
impl PartialEq for Parameters
impl StructuralPartialEq for Parameters
Auto Trait Implementations§
impl Freeze for Parameters
impl RefUnwindSafe for Parameters
impl Send for Parameters
impl Sync for Parameters
impl Unpin for Parameters
impl UnsafeUnpin for Parameters
impl UnwindSafe for Parameters
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