pub struct PackageManager {
pub package_dir: PathBuf,
pub package_paths: HashMap<u16, PackagePath>,
pub version: GameVersion,
pub platform: PackagePlatform,
pub lookup: TagLookupIndex,
/* private fields */
}Fields§
§package_dir: PathBuf§package_paths: HashMap<u16, PackagePath>§version: GameVersion§platform: PackagePlatform§lookup: TagLookupIndexTag Lookup Index (TLI)
Implementations§
Source§impl PackageManager
impl PackageManager
pub fn build_lookup_tables(&mut self)
Source§impl PackageManager
impl PackageManager
pub fn new<P: AsRef<Path>>( packages_dir: P, version: GameVersion, platform: Option<PackagePlatform>, ) -> Result<PackageManager>
Source§impl PackageManager
impl PackageManager
pub fn get_all_by_reference( &self, reference: u32, ) -> Vec<(TagHash, UEntryHeader)>
pub fn get_all_by_type( &self, etype: u8, esubtype: Option<u8>, ) -> Vec<(TagHash, UEntryHeader)>
pub fn read_tag(&self, tag: impl Into<TagHash>) -> Result<Vec<u8>>
pub fn read_tag64(&self, hash: impl Into<TagHash64>) -> Result<Vec<u8>>
pub fn get_entry(&self, tag: impl Into<TagHash>) -> Option<UEntryHeader>
pub fn get_named_tag(&self, name: &str, class_hash: u32) -> Option<TagHash>
Sourcepub fn get_tag_name(&self, tag: impl Into<TagHash>) -> Option<String>
pub fn get_tag_name(&self, tag: impl Into<TagHash>) -> Option<String>
Find the name of a tag by its hash, if it has one.
pub fn get_tag64_for_tag32(&self, tag: impl Into<TagHash>) -> Option<TagHash64>
Sourcepub fn read_tag_binrw<'a, T: BinRead>(
&self,
tag: impl Into<TagHash>,
) -> Result<T>
pub fn read_tag_binrw<'a, T: BinRead>( &self, tag: impl Into<TagHash>, ) -> Result<T>
Read any BinRead type
Sourcepub fn read_tag64_binrw<'a, T: BinRead>(
&self,
hash: impl Into<TagHash64>,
) -> Result<T>
pub fn read_tag64_binrw<'a, T: BinRead>( &self, hash: impl Into<TagHash64>, ) -> Result<T>
Read any BinRead type
pub fn package_redaction_level(&self, pkg_id: u16) -> Option<Redaction>
Auto Trait Implementations§
impl !Freeze for PackageManager
impl !RefUnwindSafe for PackageManager
impl Send for PackageManager
impl Sync for PackageManager
impl Unpin for PackageManager
impl !UnwindSafe for PackageManager
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> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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