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_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<T>,
) -> PakResult<T::ReturnType>where
T: PakItemDeserializeGroup,
pub fn query<T>(
&self,
query: impl PakQueryExpression<T>,
) -> 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 + 'static,
pub fn query_sql<T>(&self, pql: &str) -> PakResult<T::ReturnType>where
T: PakItemDeserializeGroup + 'static,
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.