Struct chd::ChdFile

source · []
pub struct ChdFile<F: Read + Seek> { /* private fields */ }
Expand description

A CHD (MAME Compressed Hunks of Data) file.

Implementations

Open a CHD file from a Read + Seek stream. Optionally provide a parent of the same stream type.

The CHD header and hunk map are read and validated immediately.

Returns a reference to the CHD header for this CHD file.

Returns an iterator over references to metadata entries for this CHD file.

The contents of each metadata entry are lazily read.

Available on unsound_owning_iterators or unstable_lending_iterators only.

Returns an iterator over metadata entries for this CHD file.

The contents of each metadata entry are lazily read.

Returns the hunk map of this CHD File.

Returns a reference to the given hunk in this CHD file.

If the requested hunk is larger than the number of hunks in the CHD file, returns ChdError::HunkOutOfRange.

Allocates a buffer with the same length as the hunk size of this CHD file.

Available on unsound_owning_iterators or unstable_lending_iterators only.

Returns an iterator over the hunks of this CHD file.

Consumes the ChdFile and returns the underlying reader.

Returns a mutable reference to the inner stream.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.