pub struct ZmanPreset {
pub event: ZmanPrimitive,
pub method_name: &'static str,
pub name: &'static str,
pub deprecated: bool,
/* private fields */
}Expand description
A named zman preset backed by a low-level ZmanPrimitive.
Most callers should use presets directly instead of constructing
ZmanPrimitive values themselves.
Fields§
§event: ZmanPrimitiveThe primitive calculation used by this preset.
method_name: &'static strThe KosherJava getter name (for example getSunrise).
name: &'static strThe user-facing preset name.
deprecated: boolWhether KosherJava marks this preset as deprecated.
Implementations§
Source§impl ZmanPreset
impl ZmanPreset
Sourcepub fn description(&self, calculator: &ZmanimCalculator) -> String
pub fn description(&self, calculator: &ZmanimCalculator) -> String
Returns a user-facing preset description.
The description includes active ZmanimCalculator settings when they
affect how this preset is calculated.
Requires the alloc feature.
Trait Implementations§
Source§impl Clone for ZmanPreset
impl Clone for ZmanPreset
Source§fn clone(&self) -> ZmanPreset
fn clone(&self) -> ZmanPreset
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 moreSource§impl Debug for ZmanPreset
impl Debug for ZmanPreset
Source§impl Format for ZmanPreset
Available on crate feature defmt only.
impl Format for ZmanPreset
Available on crate feature
defmt only.Source§impl ZmanLike for ZmanPreset
impl ZmanLike for ZmanPreset
Source§fn calculate(
&self,
calculator: &ZmanimCalculator,
) -> Result<Timestamp, ZmanimError>
fn calculate( &self, calculator: &ZmanimCalculator, ) -> Result<Timestamp, ZmanimError>
Calculates this zman with the given calculator. Read more
Auto Trait Implementations§
impl Freeze for ZmanPreset
impl RefUnwindSafe for ZmanPreset
impl Send for ZmanPreset
impl Sync for ZmanPreset
impl Unpin for ZmanPreset
impl UnsafeUnpin for ZmanPreset
impl UnwindSafe for ZmanPreset
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<F, T> ConvertInto<T> for Fwhere
T: ConvertFrom<F>,
impl<F, T> ConvertInto<T> for Fwhere
T: ConvertFrom<F>,
Source§fn convert_into(self) -> T
fn convert_into(self) -> T
Infallibly converts a value of type
Self to a value of type T.Source§impl<F, T> ConvertTryFrom<F> for Twhere
F: ConvertInto<T>,
impl<F, T> ConvertTryFrom<F> for Twhere
F: ConvertInto<T>,
Source§type Error = Infallible
type Error = Infallible
The type of an error that can occur during a conversion. Read more
Source§fn convert_try_from(value: F) -> Result<T, Infallible>
fn convert_try_from(value: F) -> Result<T, Infallible>
Fallibly converts a value of type
F to a value of type Self.Source§impl<F, T> ConvertTryInto<T> for Fwhere
T: ConvertTryFrom<F>,
impl<F, T> ConvertTryInto<T> for Fwhere
T: ConvertTryFrom<F>,
Source§type Error = <T as ConvertTryFrom<F>>::Error
type Error = <T as ConvertTryFrom<F>>::Error
The type of an error that can occur during a conversion. Read more
Source§fn convert_try_into(self) -> Result<T, <T as ConvertTryFrom<F>>::Error>
fn convert_try_into(self) -> Result<T, <T as ConvertTryFrom<F>>::Error>
Fallibly converts a value of type
Self to a value of type T.