pub struct Pak { /* private fields */ }Expand description
Represents a Pak file. This struct provides access to the metadata and data stored within the Pak file.
Implementations§
Source§impl Pak
impl Pak
Sourcepub fn new<S>(source: S) -> PakResult<Self>where
S: PakSource + 'static,
pub fn new<S>(source: S) -> PakResult<Self>where
S: PakSource + 'static,
Creates a new Pak instance from a PakSource.
Sourcepub fn new_from_file<P>(path: P) -> PakResult<Self>
pub fn new_from_file<P>(path: P) -> PakResult<Self>
Loads a Pak from the specified file path. This will not load the entire pak file into memory, just the header.
Sourcepub fn query<T>(
&self,
query: impl PakQueryExpression,
) -> PakResult<T::ReturnType>where
T: PakItemDeserializeGroup,
pub fn query<T>(
&self,
query: impl PakQueryExpression,
) -> PakResult<T::ReturnType>where
T: PakItemDeserializeGroup,
Loads an object from the pak file via queried indices. This will only load the necessary data into memory.
Sourcepub fn query_sql<T>(&self, pql: &str) -> PakResult<T::ReturnType>where
T: PakItemDeserializeGroup,
pub fn query_sql<T>(&self, pql: &str) -> PakResult<T::ReturnType>where
T: PakItemDeserializeGroup,
Loads an object from the pak file via queried indices. This will only load the necessary data into memory.
Returns the author of the pak file.
Sourcepub fn description(&self) -> &str
pub fn description(&self) -> &str
Returns the description of the pak file.
pub fn read_err<T>(&self, pointer: &PakPointer) -> PakResult<T>where
T: PakItemDeserialize,
pub fn read<T>(&self, pointer: &PakPointer) -> Option<T>where
T: PakItemDeserialize,
Auto Trait Implementations§
impl !Freeze for Pak
impl !RefUnwindSafe for Pak
impl !Send for Pak
impl !Sync for Pak
impl Unpin for Pak
impl !UnwindSafe for Pak
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