pub struct RuleContextBuilder { /* private fields */ }Expand description
Builder with validation for RuleContext.
Implementations§
Source§impl RuleContextBuilder
impl RuleContextBuilder
pub fn new() -> Self
pub fn adjustment(self, adjustment: i64) -> Self
pub fn madhab(self, madhab: Madhab) -> Self
pub fn daud_strategy(self, strategy: DaudStrategy) -> Self
pub fn add_custom_rule(self, rule: Box<dyn CustomFastingRule>) -> Self
pub fn with_sunset_provider<P: SunsetProvider + 'static>( self, provider: P, ) -> Self
Sourcepub fn strict_adjustment(self, strict: bool) -> Self
pub fn strict_adjustment(self, strict: bool) -> Self
Enables strict adjustment bounds [-2, 2].
Sourcepub fn visibility_criteria(self, criteria: VisibilityCriteria) -> Self
pub fn visibility_criteria(self, criteria: VisibilityCriteria) -> Self
Sets moon visibility criteria.
Sourcepub fn build(self) -> Result<RuleContext, ShaumError>
pub fn build(self) -> Result<RuleContext, ShaumError>
Builds and validates.
Trait Implementations§
Source§impl Debug for RuleContextBuilder
impl Debug for RuleContextBuilder
Source§impl Default for RuleContextBuilder
impl Default for RuleContextBuilder
Source§fn default() -> RuleContextBuilder
fn default() -> RuleContextBuilder
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for RuleContextBuilder
impl !RefUnwindSafe for RuleContextBuilder
impl Send for RuleContextBuilder
impl Sync for RuleContextBuilder
impl Unpin for RuleContextBuilder
impl !UnwindSafe for RuleContextBuilder
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