Expand description
A CHD (MAME Compressed Hunks of Data) file.
Implementations
sourceimpl<F: Read + Seek> ChdFile<F>
impl<F: Read + Seek> ChdFile<F>
sourcepub fn open(file: F, parent: Option<Box<ChdFile<F>>>) -> Result<ChdFile<F>>
pub fn open(file: F, parent: Option<Box<ChdFile<F>>>) -> Result<ChdFile<F>>
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.
sourcepub fn metadata(&mut self) -> Option<ChdMetadataRefIter<'_, F>>
pub fn metadata(&mut self) -> Option<ChdMetadataRefIter<'_, F>>
Returns an iterator over the metadata entries for this CHD file.
The contents of each metadata entry are lazily read.
sourcepub fn hunk(&mut self, hunk_num: u32) -> Result<ChdHunk<'_, F>>
pub fn hunk(&mut self, hunk_num: u32) -> Result<ChdHunk<'_, F>>
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
.
sourcepub fn into_inner(self) -> F
pub fn into_inner(self) -> F
Consumes the ChdFile
and returns the underlying reader.
Auto Trait Implementations
impl<F> !RefUnwindSafe for ChdFile<F>
impl<F> !Send for ChdFile<F>
impl<F> !Sync for ChdFile<F>
impl<F> Unpin for ChdFile<F> where
F: Unpin,
impl<F> !UnwindSafe for ChdFile<F>
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