pub struct Table { /* private fields */ }Expand description
PAK tables act as an index of all files in the archive. Each TableEntry points to its corresponding file data.
Implementations§
Source§impl Table
impl Table
pub fn new(entries: Vec<TableEntry>) -> Self
Sourcepub async fn read<R>(reader: &mut R, header: &Header) -> Result<Self>
pub async fn read<R>(reader: &mut R, header: &Header) -> Result<Self>
Reads a table and its entries from a (buffered) reader.
Sourcepub fn read_sync<R>(reader: &mut R, header: &Header) -> Result<Self>
pub fn read_sync<R>(reader: &mut R, header: &Header) -> Result<Self>
Reads a table and its entries from a (buffered) reader.
Sourcepub fn entries(&self) -> &Vec<TableEntry>
pub fn entries(&self) -> &Vec<TableEntry>
Retrieves the TableEntry items
Sourcepub fn contains<P: AsRef<Path>>(&self, path: P) -> bool
pub fn contains<P: AsRef<Path>>(&self, path: P) -> bool
TRUE if the table contains an entry with the given path
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Table
impl RefUnwindSafe for Table
impl Send for Table
impl Sync for Table
impl Unpin for Table
impl UnsafeUnpin for Table
impl UnwindSafe for Table
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