pub enum MCDError {
Show 14 variants
Io {
source: Error,
},
InvalidIndex {
index: usize,
num_spectra: usize,
},
Decompress {
source: DecompressError,
},
InvalidChannel {
channel: ChannelIdentifier,
},
NoSlidePresent,
LocationNotSpecified,
Utf16Erorr {
source: FromUtf16Error,
},
UnknownTag {
name: String,
},
InvalidUtf8 {
source: Utf8Error,
},
InvalidXML {
source: Error,
},
ImageError {
source: ImageError,
},
PoisonMutex,
InvalidOffset {
offset: i64,
},
TryFromIntError {
source: TryFromIntError,
},
}
Expand description
Describes what has gone wrong with reading an .mcd file
Variants§
Io
An I/O error occurred
InvalidIndex
Requested spectrum index is outside of expected range
Fields
Decompress
Issue when decompressing binary data
Fields
source: DecompressError
The original error that was raised
InvalidChannel
No channel exists which matches the specified ChannelIdentifier
Fields
channel: ChannelIdentifier
Channel identifier of the unknown channel.
NoSlidePresent
No slide present in MCD file, so likely this is not a valid .mcd file.
LocationNotSpecified
The location of the .mcd file is required to generate a .dcm file. If this is not specified either by using .from_path() or .set_location() then this error will occur.
Utf16Erorr
An error occurred when converting XML to UTF-16
Fields
source: FromUtf16Error
The original error that was raised.
UnknownTag
An unknown tag appeared in the XML file
InvalidUtf8
An error occured when parsing part of the XML file (conversion to UTF-8)
InvalidXML
An error occured when parsing the XML file
ImageError
An error occured when parsing an image.
Fields
source: ImageError
The original error that was raised.
PoisonMutex
An error occured when locking the reader.
InvalidOffset
Invalid offset in file.
TryFromIntError
An error occured when trying to convert from an integer.
Fields
source: TryFromIntError
The original error that was raised.
Trait Implementations§
Source§impl Error for MCDError
impl Error for MCDError
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
Source§impl From<DecompressError> for MCDError
impl From<DecompressError> for MCDError
Source§fn from(source: DecompressError) -> Self
fn from(source: DecompressError) -> Self
Source§impl From<FromUtf16Error> for MCDError
impl From<FromUtf16Error> for MCDError
Source§fn from(source: FromUtf16Error) -> Self
fn from(source: FromUtf16Error) -> Self
Source§impl From<ImageError> for MCDError
impl From<ImageError> for MCDError
Source§fn from(source: ImageError) -> Self
fn from(source: ImageError) -> Self
Source§impl From<TryFromIntError> for MCDError
impl From<TryFromIntError> for MCDError
Source§fn from(source: TryFromIntError) -> Self
fn from(source: TryFromIntError) -> Self
Auto Trait Implementations§
impl Freeze for MCDError
impl !RefUnwindSafe for MCDError
impl Send for MCDError
impl Sync for MCDError
impl Unpin for MCDError
impl !UnwindSafe for MCDError
Blanket Implementations§
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 moreSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self
from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self
is actually part of its subset T
(and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset
but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self
to the equivalent element of its superset.