pub struct RFileInfo { /* private fields */ }Expand description
This struct represents the detailed info about the PackedFile we can provide to whoever request it.
Implementations§
Source§impl RFileInfo
impl RFileInfo
Sourcepub fn info_from_global_search(
global_search: &GlobalSearch,
packs: &BTreeMap<String, Pack>,
) -> Vec<Self>
pub fn info_from_global_search( global_search: &GlobalSearch, packs: &BTreeMap<String, Pack>, ) -> Vec<Self>
This function returns the PackedFileInfo for all the PackedFiles the current search has searched on.
Sourcepub fn table_name(&self) -> Option<&str>
pub fn table_name(&self) -> Option<&str>
Returns the table name for DB files.
For DB files, the path format is db/<table_name>/<file_name>, so this extracts
the second path component. Returns None if the file is not a DB file or if
the path doesn’t have the expected structure.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for RFileInfo
impl<'de> Deserialize<'de> for RFileInfo
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl From<&RFile> for RFileInfo
impl From<&RFile> for RFileInfo
Extracts the path, container name, timestamp, and file type from the packed file. This is the primary way to create file info for display in the UI.
Source§impl From<&RFileInfo> for ContainerInfo
Creates a ContainerInfo from an RFileInfo.
impl From<&RFileInfo> for ContainerInfo
Creates a ContainerInfo from an RFileInfo.
This is used when treating an individual file as if it were a container (e.g., for AnimPacks stored within a Pack). Most fields default to their default values since a single file doesn’t have pack-level metadata.
Auto Trait Implementations§
impl Freeze for RFileInfo
impl RefUnwindSafe for RFileInfo
impl Send for RFileInfo
impl Sync for RFileInfo
impl Unpin for RFileInfo
impl UnsafeUnpin for RFileInfo
impl UnwindSafe for RFileInfo
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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>
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>
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§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<R, P> ReadPrimitive<R> for P
impl<R, P> ReadPrimitive<R> for P
Source§fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
ReadEndian::read_from_little_endian().§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self from the equivalent element of its
superset. Read more§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self is actually part of its subset T (and can be converted to it).§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset but without any property checks. Always succeeds.§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self to the equivalent element of its superset.