#[non_exhaustive]pub enum FitsError {
AmbiguousKeyword {
keyword: String,
count: usize,
},
KeywordTooLong {
keyword: String,
},
InvalidKeyword {
keyword: String,
},
OccurrenceOutOfRange {
keyword: String,
occurrence: usize,
count: usize,
},
DataTooLarge {
declared: u64,
max: u64,
},
}Expand description
Errors from validated header mutations, ambiguous lookups, and oversized standalone serialization.
Parsing is lenient and does not produce these; header-only serialization
(Header::to_header_bytes) is infallible.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
AmbiguousKeyword
A bare-name get/set/remove addressed a keyword that occurs more than once.
Select one with an (name, occurrence) key.
KeywordTooLong
A keyword longer than the 8-character FITS field.
InvalidKeyword
A keyword containing bytes outside the FITS keyword set (A-Z 0-9 - _).
OccurrenceOutOfRange
An (name, occurrence) key targeted an occurrence that does not exist.
Fields
DataTooLarge
Header::to_bytes declined to zero-fill a declared data
segment larger than MAX_ZERO_FILL. Serialize the header with
Header::to_header_bytes and supply the data yourself.
Fields
max: u64The cap it exceeds (MAX_ZERO_FILL).
Trait Implementations§
impl Eq for FitsError
Source§impl Error for FitsError
impl Error for FitsError
1.30.0 · 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()