pub enum FitsCubeError {
Fits(Error),
Io(Error),
Shape(ShapeError),
MissingKeyword(String),
TargetAxisMissing(String),
ChannelMissing(String),
OutputExists(PathBuf),
InvalidSpec(String),
UnsupportedNaxis(i64),
TimeParse {
value: String,
msg: String,
},
Other(String),
}Expand description
Top-level error for all fitscube-rs operations.
TargetAxisMissing and ChannelMissing correspond to the Python
TargetAxisMissingException and ChannelMissingException.
Variants§
Fits(Error)
Underlying cfitsio error.
Io(Error)
Filesystem I/O error.
Shape(ShapeError)
ndarray shape mismatch when reshaping a flat plane buffer.
MissingKeyword(String)
A required header keyword was absent.
TargetAxisMissing(String)
The FREQ/TIME (or other requested) axis was not found in the WCS.
Equivalent to Python TargetAxisMissingException.
ChannelMissing(String)
A requested channel/timestep could not be accessed.
Equivalent to Python ChannelMissingException.
OutputExists(PathBuf)
The output file already exists and overwrite was not set.
InvalidSpec(String)
Mutually exclusive spectral-input options were combined, or a count mismatch was detected.
UnsupportedNaxis(i64)
A FITS image had an unexpected dimensionality.
TimeParse
Failed to parse a DATE-OBS timestamp.
Other(String)
Catch-all for invariant violations.
Trait Implementations§
Source§impl Debug for FitsCubeError
impl Debug for FitsCubeError
Source§impl Display for FitsCubeError
impl Display for FitsCubeError
Source§impl Error for FitsCubeError
impl Error for FitsCubeError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()
Source§impl From<AtfitsError> for FitsCubeError
Map the shared atfits_rs::AtfitsError into the fitscube-rs hierarchy.
impl From<AtfitsError> for FitsCubeError
Map the shared atfits_rs::AtfitsError into the fitscube-rs hierarchy.
The low-level cfitsio helpers (keyword editing, image creation, axis lookup)
live in atfits-rs; this lets a ? on any of them flow into a
FitsCubeError with the matching variant.
Source§fn from(e: AtfitsError) -> Self
fn from(e: AtfitsError) -> Self
Source§impl From<Error> for FitsCubeError
impl From<Error> for FitsCubeError
Source§impl From<Error> for FitsCubeError
impl From<Error> for FitsCubeError
Source§impl From<ShapeError> for FitsCubeError
impl From<ShapeError> for FitsCubeError
Source§fn from(source: ShapeError) -> Self
fn from(source: ShapeError) -> Self
Auto Trait Implementations§
impl !RefUnwindSafe for FitsCubeError
impl !UnwindSafe for FitsCubeError
impl Freeze for FitsCubeError
impl Send for FitsCubeError
impl Sync for FitsCubeError
impl Unpin for FitsCubeError
impl UnsafeUnpin for FitsCubeError
Blanket Implementations§
Source§impl<T> AsErrorSource for Twhere
T: Error + 'static,
impl<T> AsErrorSource for Twhere
T: Error + 'static,
Source§fn as_error_source(&self) -> &(dyn Error + 'static)
fn as_error_source(&self) -> &(dyn Error + 'static)
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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>
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>
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