pub trait SunsetProvider:
Debug
+ Send
+ Sync {
// Required method
fn get_sunset(
&self,
date: NaiveDate,
coords: GeoCoordinate,
) -> Result<DateTime<Utc>, ShaumError>;
}Expand description
Interface for calculating sunset time.
Required Methods§
Sourcefn get_sunset(
&self,
date: NaiveDate,
coords: GeoCoordinate,
) -> Result<DateTime<Utc>, ShaumError>
fn get_sunset( &self, date: NaiveDate, coords: GeoCoordinate, ) -> Result<DateTime<Utc>, ShaumError>
Returns the sunset timestamp for a given date and coordinate.