#[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
A custom error when encoding fails.
Read the message
and the underlying source
for more details.
Fields
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 EncodeError
impl Error for EncodeError
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 moreSource§impl FromString for EncodeError
impl FromString for EncodeError
Source§impl IntoError<EncodeError> for FrameRangeOutOfBoundsSnafu
impl IntoError<EncodeError> for FrameRangeOutOfBoundsSnafu
Source§fn into_error(self, error: Self::Source) -> EncodeError
fn into_error(self, error: Self::Source) -> EncodeError
Source§impl<__T0> IntoError<EncodeError> for MissingAttributeSnafu<__T0>
impl<__T0> IntoError<EncodeError> for MissingAttributeSnafu<__T0>
Source§fn into_error(self, error: Self::Source) -> EncodeError
fn into_error(self, error: Self::Source) -> EncodeError
Source§impl IntoError<EncodeError> for NotNativeSnafu
impl IntoError<EncodeError> for NotNativeSnafu
Source§fn into_error(self, error: Self::Source) -> EncodeError
fn into_error(self, error: Self::Source) -> EncodeError
Auto Trait Implementations§
impl Freeze for EncodeError
impl !RefUnwindSafe for EncodeError
impl Send for EncodeError
impl Sync for EncodeError
impl Unpin for EncodeError
impl !UnwindSafe for EncodeError
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> 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