Skip to main content

neda_lib/core/
providers.rs

1use crate::core::config::Config;
2use crate::core::prayers_times::PrayersTimesStuck;
3
4#[derive(Debug)]
5pub enum ProviderError {
6    NetworkError,
7    PermissionError,
8    InvalidConfig,
9    InvalidDate,
10    InvalidCity,
11    InvalidCountry,
12    UnknownError,
13    InvalidResponse,
14    TimeParseError,
15    UnsupportedOperation,
16    MissingField,
17    ParseError,
18    ConnectionError,
19}
20
21pub trait Provider {
22    fn get_prayers_times(&self, config: &Config) -> Result<PrayersTimesStuck, ProviderError>;
23}