pub struct PakManifest { /* private fields */ }Expand description
Represents the header, table, and table directory of a PAK file.
Implementations§
Source§impl PakManifest
impl PakManifest
pub fn new(header: Header, table: Table) -> Self
Sourcepub async fn read<R>(reader: &mut R) -> Result<Self>
pub async fn read<R>(reader: &mut R) -> Result<Self>
Reads a PAK manifest from an (buffered) reader.
Sourcepub fn read_sync<R>(reader: &mut R) -> Result<Self>
pub fn read_sync<R>(reader: &mut R) -> Result<Self>
Reads a PAK manifest from a (buffered) reader.
Sourcepub fn from_dir_sync<P: AsRef<Path>>(input_dir: P) -> Result<Self>
pub fn from_dir_sync<P: AsRef<Path>>(input_dir: P) -> Result<Self>
Generates a PAK manifest from a directory. Throws Error::NonUtf8Path, Error::FilenameTooLong
Sourcepub async fn from_dir<P: AsRef<Path>>(input_dir: P) -> Result<Self>
pub async fn from_dir<P: AsRef<Path>>(input_dir: P) -> Result<Self>
Generates a PAK manifest from a directory. Throws Error::NonUtf8Path, Error::FilenameTooLong
pub fn from_walk_results(files: Vec<(PathBuf, u64)>) -> Result<Self>
pub fn header(&self) -> &Header
Sourcepub fn table_entries(&self) -> &Vec<TableEntry>
pub fn table_entries(&self) -> &Vec<TableEntry>
Returns the table entries of a PAK, including filepath, size, and offset of each item.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for PakManifest
impl RefUnwindSafe for PakManifest
impl Send for PakManifest
impl Sync for PakManifest
impl Unpin for PakManifest
impl UnsafeUnpin for PakManifest
impl UnwindSafe for PakManifest
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