pub enum CoordError {
InvalidCoordinate {
message: String,
},
EpochError {
source: TimeError,
},
CoreError {
message: String,
},
InvalidDistance {
message: String,
},
MissingObserver,
UnsupportedOperation {
message: String,
},
ParsingError {
message: String,
},
DataUnavailable {
message: String,
},
ExternalError {
message: String,
},
}Variants§
InvalidCoordinate
EpochError
CoreError
InvalidDistance
MissingObserver
UnsupportedOperation
ParsingError
ExternalError
Errors from external libraries (filesystem, network, etc.)
This is deliberately unstructured (just a string) since external error types vary widely. If richer context is needed for specific external errors, add dedicated variants.
Implementations§
Source§impl CoordError
impl CoordError
pub fn invalid_coordinate(message: impl Into<String>) -> Self
pub fn invalid_distance(message: impl Into<String>) -> Self
pub fn unsupported_operation(message: impl Into<String>) -> Self
pub fn parsing_error(message: impl Into<String>) -> Self
pub fn external_library(operation: &str, error: &str) -> Self
pub fn from_core(error: AstroError) -> Self
Trait Implementations§
Source§impl Debug for CoordError
impl Debug for CoordError
Source§impl Display for CoordError
impl Display for CoordError
Source§impl Error for CoordError
impl Error for CoordError
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 From<AstroError> for CoordError
impl From<AstroError> for CoordError
Source§fn from(error: AstroError) -> Self
fn from(error: AstroError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for CoordError
impl RefUnwindSafe for CoordError
impl Send for CoordError
impl Sync for CoordError
impl Unpin for CoordError
impl UnsafeUnpin for CoordError
impl UnwindSafe for CoordError
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