Enum dicom_encoding::adapters::DecodeError
source · #[non_exhaustive]pub enum DecodeError {
Custom {
message: String,
source: Option<Box<dyn Error + Send + Sync + 'static>>,
},
NotEncapsulated,
FrameRangeOutOfBounds,
MissingAttribute {
name: &'static str,
},
}Expand description
The possible error conditions when decoding (reading) pixel data.
Users of this type are free to handle errors based on their variant, but should not make decisions based on the display message, since that is not considered part of the API and may change on any new release.
Implementers of transfer syntaxes
are recommended to choose the most fitting error variant
for the tested condition.
When no suitable variant is available,
the Custom variant may be used.
See also snafu for guidance on using context selectors.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Custom
Fields
A custom error occurred when decoding, reported as a dynamic error value with a message.
The whatever! macro can be used
to easily create an error of this kind.
NotEncapsulated
The input pixel data is not encapsulated.
Either the image needs no decoding or the compressed imaging data was in a flat pixel data element by mistake.
FrameRangeOutOfBounds
The requested frame range is outside the given object’s frame range.
MissingAttribute
A required attribute is missing from the DICOM object representing the image.
Trait Implementations§
source§impl Debug for DecodeError
impl Debug for DecodeError
source§impl Display for DecodeError
impl Display for DecodeError
source§impl Error for DecodeErrorwhere
Self: Debug + Display,
impl Error for DecodeErrorwhere Self: Debug + Display,
source§fn description(&self) -> &str
fn description(&self) -> &str
source§fn cause(&self) -> Option<&dyn Error>
fn cause(&self) -> Option<&dyn Error>
source§impl ErrorCompat for DecodeError
impl ErrorCompat for DecodeError
source§fn iter_chain(&self) -> ChainCompat<'_>where
Self: AsErrorSource,
fn iter_chain(&self) -> ChainCompat<'_>where Self: AsErrorSource,
Error::source. Read more