Enum dicom_encoding::adapters::EncodeError
source · #[non_exhaustive]pub enum EncodeError {
Custom {
message: String,
source: Option<Box<dyn Error + Send + Sync + 'static>>,
},
NotNative,
FrameRangeOutOfBounds,
MissingAttribute {
name: &'static str,
},
}Expand description
The possible error conditions when encoding (writing) 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 when encoding fails.
Read the message and the underlying source
for more details.
NotNative
Input pixel data is not native, should be decoded first.
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 EncodeError
impl Debug for EncodeError
source§impl Display for EncodeError
impl Display for EncodeError
source§impl Error for EncodeErrorwhere
Self: Debug + Display,
impl Error for EncodeErrorwhere 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 EncodeError
impl ErrorCompat for EncodeError
source§fn iter_chain(&self) -> ChainCompat<'_>where
Self: AsErrorSource,
fn iter_chain(&self) -> ChainCompat<'_>where Self: AsErrorSource,
Error::source. Read more