#[repr(C)]
pub enum chd_error {
Show 29 variants
None,
NoInterface,
OutOfMemory,
InvalidFile,
InvalidParameter,
InvalidData,
FileNotFound,
RequiresParent,
FileNotWriteable,
ReadError,
WriteError,
CodecError,
InvalidParent,
HunkOutOfRange,
DecompressionError,
CompressionError,
CantCreateFile,
CantVerify,
NotSupported,
MetadataNotFound,
InvalidMetadataSize,
UnsupportedVersion,
VerifyIncomplete,
InvalidMetadata,
InvalidState,
OperationPending,
NoAsyncOperation,
UnsupportedFormat,
Unknown,
}Expand description
Error types that may occur when reading a CHD file or hunk.
This type tries to be ABI-compatible with libchdr, given sane defaults in the C compiler. See repr(C) in the Rustonomicon for more details.
Variants
None
No error. This is only used by the C API bindings.
NoInterface
No drive interface. This is only for C-compatibility purposes and is otherwise unused.
OutOfMemory
Unable to allocate the required size of buffer.
InvalidFile
The file is not a valid CHD file.
InvalidParameter
An invalid parameter was provided.
InvalidData
The data is invalid.
FileNotFound
The file was not found.
RequiresParent
This CHD requires a parent CHD that was not provided.
FileNotWriteable
The provided file is not writable. Since chd-rs does not implement CHD creation, this is unused.
ReadError
An error occurred when reading this CHD file.
WriteError
An error occurred when writing this CHD file. Since chd-rs does not implement CHD creation, this is unused.
CodecError
An error occurred when initializing a codec.
InvalidParent
The provided parent CHD is invalid.
HunkOutOfRange
The request hunk is out of range for this CHD file.
DecompressionError
An error occurred when decompressing a hunk.
CompressionError
An error occurred when compressing a hunk. Since chd-rs does not implement CHD creation, this is unused.
CantCreateFile
Could not create the file. Since chd-rs does not implement CHD creation, this is unused.
CantVerify
Could not verify the CHD. This is only for C-compatibility purposes and is otherwise unused.
NotSupported
The requested operation is not supported. This is only for C-compatibility purposes and is otherwise unused.
MetadataNotFound
The requested metadata was not found. This is only used by the C API bindings.
InvalidMetadataSize
The metadata has an invalid size. This is only for C-compatibility purposes and is otherwise unused.
UnsupportedVersion
The CHD version of the provided file is not supported by this library.
VerifyIncomplete
Unable to verify the CHD completely. This is only for C-compatibility purposes and is otherwise unused.
InvalidMetadata
The requested metadata is invalid.
InvalidState
The internal state of the decoder/encoder is invalid. This is only for C-compatibility purposes and is otherwise unused.
OperationPending
An operation is already pending. This is only for C-compatibility purposes and is otherwise unused.
NoAsyncOperation
No async operations are allowed. This is only for C-compatibility purposes and is otherwise unused.
UnsupportedFormat
Decompressing the CHD requires a codec that is not supported.
Unknown
Unknown error.
Trait Implementations
sourceimpl Error for ChdError
impl Error for ChdError
1.30.0 · sourcefn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
The lower-level source of this error, if any. Read more
1.0.0 · sourcefn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()
sourceimpl From<FromBytesWithNulError> for ChdError
impl From<FromBytesWithNulError> for ChdError
sourcefn from(FromBytesWithNulError) -> ChdError
fn from(FromBytesWithNulError) -> ChdError
Converts to this type from the input type.
sourceimpl From<TryFromSliceError> for ChdError
impl From<TryFromSliceError> for ChdError
sourcefn from(TryFromSliceError) -> ChdError
fn from(TryFromSliceError) -> ChdError
Converts to this type from the input type.
Auto Trait Implementations
impl RefUnwindSafe for ChdError
impl Send for ChdError
impl Sync for ChdError
impl Unpin for ChdError
impl UnwindSafe for ChdError
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more