pub enum ShaumError {
DateOutOfRange {
date: NaiveDate,
min: NaiveDate,
max: NaiveDate,
},
InvalidConfiguration {
reason: String,
},
AnalysisError(String),
HijriConversionError(String),
SunsetCalculationError(String),
MoonProviderError(String),
ValidationError(String),
AstronomyError(String),
DatabaseError(String),
NetworkError(String),
}Expand description
Errors from shaum operations.
Variants§
DateOutOfRange
Date outside supported range (1938-2076).
InvalidConfiguration
Invalid configuration.
AnalysisError(String)
Analysis failure.
HijriConversionError(String)
Hijri conversion error.
SunsetCalculationError(String)
Sunset calculation error.
MoonProviderError(String)
Moon provider error.
ValidationError(String)
Coordinate or input validation error.
AstronomyError(String)
Astronomy calculation error (e.g., polar regions).
DatabaseError(String)
Database error (e.g., MaxMind GeoIP lookup).
NetworkError(String)
Network error (async/remote operations).
Implementations§
Source§impl ShaumError
impl ShaumError
Sourcepub fn date_out_of_range(date: NaiveDate) -> Self
pub fn date_out_of_range(date: NaiveDate) -> Self
Creates a DateOutOfRange error with standard bounds.
Sourcepub fn invalid_config(reason: impl Into<String>) -> Self
pub fn invalid_config(reason: impl Into<String>) -> Self
Creates an InvalidConfiguration error.
Trait Implementations§
Source§impl Clone for ShaumError
impl Clone for ShaumError
Source§fn clone(&self) -> ShaumError
fn clone(&self) -> ShaumError
Returns a duplicate of the value. Read more
1.0.0 · 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 ShaumError
impl Debug for ShaumError
Source§impl<'de> Deserialize<'de> for ShaumError
impl<'de> Deserialize<'de> for ShaumError
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Display for ShaumError
impl Display for ShaumError
Source§impl Error for ShaumError
impl Error for ShaumError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
Auto Trait Implementations§
impl Freeze for ShaumError
impl RefUnwindSafe for ShaumError
impl Send for ShaumError
impl Sync for ShaumError
impl Unpin for ShaumError
impl UnwindSafe for ShaumError
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