#[repr(C)]pub enum Error {
Show 29 variants
None = 0,
NoInterface = 1,
OutOfMemory = 2,
InvalidFile = 3,
InvalidParameter = 4,
InvalidData = 5,
FileNotFound = 6,
RequiresParent = 7,
FileNotWriteable = 8,
ReadError = 9,
WriteError = 10,
CodecError = 11,
InvalidParent = 12,
HunkOutOfRange = 13,
DecompressionError = 14,
CompressionError = 15,
CantCreateFile = 16,
CantVerify = 17,
NotSupported = 18,
MetadataNotFound = 19,
InvalidMetadataSize = 20,
UnsupportedVersion = 21,
VerifyIncomplete = 22,
InvalidMetadata = 23,
InvalidState = 24,
OperationPending = 25,
NoAsyncOperation = 26,
UnsupportedFormat = 27,
Unknown = 28,
}
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 = 0
No error. This is only used by the C API bindings.
NoInterface = 1
No drive interface. This is only for C-compatibility purposes and is otherwise unused.
OutOfMemory = 2
Unable to allocate the required size of buffer.
InvalidFile = 3
The file is not a valid CHD file.
InvalidParameter = 4
An invalid parameter was provided.
InvalidData = 5
The data is invalid.
FileNotFound = 6
The file was not found.
RequiresParent = 7
This CHD requires a parent CHD that was not provided.
FileNotWriteable = 8
The provided file is not writable. Since chd-rs does not implement CHD creation, this is unused.
ReadError = 9
An error occurred when reading this CHD file.
WriteError = 10
An error occurred when writing this CHD file. Since chd-rs does not implement CHD creation, this is unused.
CodecError = 11
An error occurred when initializing a codec.
InvalidParent = 12
The provided parent CHD is invalid.
HunkOutOfRange = 13
The request hunk is out of range for this CHD file.
DecompressionError = 14
An error occurred when decompressing a hunk.
CompressionError = 15
An error occurred when compressing a hunk. Since chd-rs does not implement CHD creation, this is unused.
CantCreateFile = 16
Could not create the file. Since chd-rs does not implement CHD creation, this is unused.
CantVerify = 17
Could not verify the CHD. This is only for C-compatibility purposes and is otherwise unused.
NotSupported = 18
The requested operation is not supported. This is only for C-compatibility purposes and is otherwise unused.
MetadataNotFound = 19
The requested metadata was not found. This is only used by the C API bindings.
InvalidMetadataSize = 20
The metadata has an invalid size. This is only for C-compatibility purposes and is otherwise unused.
UnsupportedVersion = 21
The CHD version of the provided file is not supported by this library.
VerifyIncomplete = 22
Unable to verify the CHD completely. This is only for C-compatibility purposes and is otherwise unused.
InvalidMetadata = 23
The requested metadata is invalid.
InvalidState = 24
The internal state of the decoder/encoder is invalid. This is only for C-compatibility purposes and is otherwise unused.
OperationPending = 25
An operation is already pending. This is only for C-compatibility purposes and is otherwise unused.
NoAsyncOperation = 26
No async operations are allowed. This is only for C-compatibility purposes and is otherwise unused.
UnsupportedFormat = 27
Decompressing the CHD requires a codec that is not supported.
Unknown = 28
Unknown error.