pub struct SunEvents { /* private fields */ }
Expand description
This struct allows one to create iterators over sun events moving forward or backward in time.
Implementations
sourceimpl SunEvents
impl SunEvents
sourcepub fn starting_from(
start_date: DateTime<Utc>,
position: GlobalPosition,
event_whitelist: &[SunEvent]
) -> Self
pub fn starting_from(
start_date: DateTime<Utc>,
position: GlobalPosition,
event_whitelist: &[SunEvent]
) -> Self
List SunEvents starting from the start_date
, computed at position
,
including only the SunEvents listed in the event_whitelist
.
Panics
Panics when event_whitelist
is empty.
sourcepub fn forecast(self) -> ForecastedSunEvents ⓘ
pub fn forecast(self) -> ForecastedSunEvents ⓘ
List SunEvents occurring after the start_date.
sourcepub fn history(self) -> HistoricSunEvents ⓘ
pub fn history(self) -> HistoricSunEvents ⓘ
List SunEvents occurring before the start_date.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for SunEvents
impl Send for SunEvents
impl Sync for SunEvents
impl Unpin for SunEvents
impl UnwindSafe for SunEvents
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more