pub struct Cabinet<R: ?Sized> { /* private fields */ }
Expand description
A structure for reading a cabinet file.
Implementations§
source§impl<R: Read + Seek> Cabinet<R>
impl<R: Read + Seek> Cabinet<R>
sourcepub fn cabinet_set_id(&self) -> u16
pub fn cabinet_set_id(&self) -> u16
Returns the cabinet set ID for this cabinet (an arbitrary number used to group together a set of cabinets).
sourcepub fn cabinet_set_index(&self) -> u16
pub fn cabinet_set_index(&self) -> u16
Returns this cabinet’s (zero-based) index within its cabinet set.
sourcepub fn reserve_data(&self) -> &[u8] ⓘ
pub fn reserve_data(&self) -> &[u8] ⓘ
Returns the application-defined reserve data stored in the cabinet header.
sourcepub fn folder_entries(&self) -> FolderEntries<'_> ⓘ
pub fn folder_entries(&self) -> FolderEntries<'_> ⓘ
Returns an iterator over the folder entries in this cabinet.
sourcepub fn get_file_entry(&self, name: &str) -> Option<&FileEntry>
pub fn get_file_entry(&self, name: &str) -> Option<&FileEntry>
Returns the entry for the file with the given name, if any..
sourcepub fn read_file(&mut self, name: &str) -> Result<FileReader<'_, R>>
pub fn read_file(&mut self, name: &str) -> Result<FileReader<'_, R>>
Returns a reader over the decompressed data for the file in the cabinet with the given name.
Auto Trait Implementations§
impl<R> !Freeze for Cabinet<R>
impl<R> !RefUnwindSafe for Cabinet<R>
impl<R> Send for Cabinet<R>
impl<R> !Sync for Cabinet<R>
impl<R> Unpin for Cabinet<R>
impl<R> UnwindSafe for Cabinet<R>where
R: UnwindSafe + ?Sized,
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
Mutably borrows from an owned value. Read more