pub struct BlockTable { /* private fields */ }Expand description
Block table
Implementations§
Source§impl BlockTable
impl BlockTable
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 block 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 block table from bytes (needs decryption)
Sourcepub fn entries(&self) -> &[BlockEntry]
pub fn entries(&self) -> &[BlockEntry]
Get all entries
Sourcepub fn get(&self, index: usize) -> Option<&BlockEntry>
pub fn get(&self, index: usize) -> Option<&BlockEntry>
Get a specific entry
Sourcepub fn get_mut(&mut self, index: usize) -> Option<&mut BlockEntry>
pub fn get_mut(&mut self, index: usize) -> Option<&mut BlockEntry>
Get a mutable reference to a specific entry
Sourcepub fn entries_mut(&mut self) -> &mut [BlockEntry]
pub fn entries_mut(&mut self) -> &mut [BlockEntry]
Get mutable access to all entries
Trait Implementations§
Auto Trait Implementations§
impl Freeze for BlockTable
impl RefUnwindSafe for BlockTable
impl Send for BlockTable
impl Sync for BlockTable
impl Unpin for BlockTable
impl UnwindSafe for BlockTable
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