pub enum AstroError {
InvalidCoordinate {
coord_type: &'static str,
value: f64,
valid_range: &'static str,
},
InvalidDateTime {
reason: String,
},
CalculationError {
calculation: &'static str,
reason: String,
},
NeverRisesOrSets {
always_above: bool,
},
InvalidDmsFormat {
input: String,
expected: &'static str,
},
OutOfRange {
parameter: &'static str,
value: f64,
min: f64,
max: f64,
},
ProjectionError {
reason: String,
},
}Expand description
Main error type for astro-math operations.
This enum represents all possible errors that can occur during astronomical calculations. Each variant provides specific information about what went wrong.
Variants§
InvalidCoordinate
Invalid coordinate value
Fields
InvalidDateTime
Invalid time/date
CalculationError
Calculation failed
NeverRisesOrSets
Object never rises or sets
InvalidDmsFormat
Invalid DMS string format
OutOfRange
Value out of valid range
Fields
ProjectionError
Projection error (e.g., point on opposite side of sky)
Trait Implementations§
Source§impl Clone for AstroError
impl Clone for AstroError
Source§fn clone(&self) -> AstroError
fn clone(&self) -> AstroError
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 AstroError
impl Debug for AstroError
Source§impl Display for AstroError
impl Display for AstroError
Source§impl Error for AstroError
impl Error for AstroError
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()
Source§impl PartialEq for AstroError
impl PartialEq for AstroError
impl StructuralPartialEq for AstroError
Auto Trait Implementations§
impl Freeze for AstroError
impl RefUnwindSafe for AstroError
impl Send for AstroError
impl Sync for AstroError
impl Unpin for AstroError
impl UnsafeUnpin for AstroError
impl UnwindSafe for AstroError
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more