pub struct HashTable { /* private fields */ }Expand description
Hash table
Implementations§
Source§impl HashTable
impl HashTable
Sourcepub fn read<R: Read + Seek>(
reader: &mut R,
offset: u64,
size: u32,
) -> Result<Self>
pub fn read<R: Read + Seek>( reader: &mut R, offset: u64, size: u32, ) -> Result<Self>
Read and decrypt a hash table from the archive
Sourcepub fn from_bytes(data: &[u8], size: u32) -> Result<Self>
pub fn from_bytes(data: &[u8], size: u32) -> Result<Self>
Create a hash table from bytes (needs decryption)
Sourcepub fn find_file(
&self,
filename: &str,
locale: u16,
) -> Option<(usize, &HashEntry)>
pub fn find_file( &self, filename: &str, locale: u16, ) -> Option<(usize, &HashEntry)>
Find a file in the hash table
Sourcepub fn get_mut(&mut self, index: usize) -> Option<&mut HashEntry>
pub fn get_mut(&mut self, index: usize) -> Option<&mut HashEntry>
Get a mutable reference to a specific entry
Sourcepub fn entries_mut(&mut self) -> &mut [HashEntry]
pub fn entries_mut(&mut self) -> &mut [HashEntry]
Get mutable access to all entries
Trait Implementations§
Auto Trait Implementations§
impl Freeze for HashTable
impl RefUnwindSafe for HashTable
impl Send for HashTable
impl Sync for HashTable
impl Unpin for HashTable
impl UnwindSafe for HashTable
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more