#[non_exhaustive]pub enum Error {
ReadMagicCode {
backtrace: Backtrace,
source: Error,
},
ReadValueData {
backtrace: Backtrace,
source: Error,
},
AllocationSize {
backtrace: Backtrace,
source: TryReserveError,
},
DecodeText {
name: Cow<'static, str>,
source: DecodeTextError,
},
NotDicom {
backtrace: Backtrace,
},
DecodeElement {
source: Error,
},
UnexpectedTag {
tag: Tag,
backtrace: Backtrace,
},
MissingElement {
alias: &'static str,
backtrace: Backtrace,
},
UnexpectedDataValueLength {
tag: Tag,
length: Length,
backtrace: Backtrace,
},
UndefinedValueLength {
tag: Tag,
backtrace: Backtrace,
},
WriteSet {
source: Error,
},
}
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
ReadMagicCode
The file meta group parser could not read
the magic code DICM
from its source.
ReadValueData
The file meta group parser could not fetch the value of a data element from its source.
AllocationSize
The parser could not allocate memory for the given length of a data element.
DecodeText
The file meta group parser could not decode the text in one of its data elements.
NotDicom
Invalid DICOM data, detected by checking the DICM
code.
DecodeElement
An issue occurred while decoding the next data element in the file meta data set.
UnexpectedTag
A data element with an unexpected tag was retrieved: the parser was expecting another tag first, or at least one that is part of the the file meta group.
MissingElement
A required file meta data element is missing.
UnexpectedDataValueLength
The value length of a data elements in the file meta group was unexpected.
UndefinedValueLength
The value length of a data element is undefined, but knowing the length is required in its context.
WriteSet
The file meta group data set could not be written.
Trait Implementations§
Source§impl Error for Error
impl Error for Error
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 Error
impl ErrorCompat for Error
Source§fn iter_chain(&self) -> ChainCompat<'_, '_>where
Self: AsErrorSource,
fn iter_chain(&self) -> ChainCompat<'_, '_>where
Self: AsErrorSource,
Error::source
. Read moreAuto Trait Implementations§
impl !Freeze for Error
impl !RefUnwindSafe for Error
impl Send for Error
impl Sync for Error
impl Unpin for Error
impl !UnwindSafe for Error
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