SunsetProvider

Trait SunsetProvider 

Source
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§

Source

fn get_sunset( &self, date: NaiveDate, coords: GeoCoordinate, ) -> Result<DateTime<Utc>, ShaumError>

Returns the sunset timestamp for a given date and coordinate.

Implementors§