pub struct ContainerInfo { /* private fields */ }Expand description
This struct is a reduced version of the PackFile one, used to pass just the needed data to an UI.
Don’t create this one manually. Get it From the PackFile one, and use it as you need it.
Implementations§
Source§impl ContainerInfo
impl ContainerInfo
Sourcepub fn file_name(&self) -> &String
pub fn file_name(&self) -> &String
The name of the PackFile’s file, if exists. If not, then this should be empty.
Sourcepub fn file_path(&self) -> &String
pub fn file_path(&self) -> &String
The path of the PackFile on disk, if exists. If not, then this should be empty.
Sourcepub fn pfh_version(&self) -> &PFHVersion
pub fn pfh_version(&self) -> &PFHVersion
The version of the PackFile.
Sourcepub fn pfh_file_type(&self) -> &PFHFileType
pub fn pfh_file_type(&self) -> &PFHFileType
The type of the PackFile.
Sourcepub fn compress(&self) -> &CompressionFormat
pub fn compress(&self) -> &CompressionFormat
If the container needs to be compress on save. None for no compression.
Trait Implementations§
Source§impl Clone for ContainerInfo
impl Clone for ContainerInfo
Source§fn clone(&self) -> ContainerInfo
fn clone(&self) -> ContainerInfo
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ContainerInfo
impl Debug for ContainerInfo
Source§impl Default for ContainerInfo
impl Default for ContainerInfo
Source§fn default() -> ContainerInfo
fn default() -> ContainerInfo
Source§impl<'de> Deserialize<'de> for ContainerInfo
impl<'de> Deserialize<'de> for ContainerInfo
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<&AnimPack> for ContainerInfo
NOTE: DO NOT USE THIS FOR ANIMPACKS WITHIN PACKS.
impl From<&AnimPack> for ContainerInfo
NOTE: DO NOT USE THIS FOR ANIMPACKS WITHIN PACKS.
It sets the path and name wrong in those cases.
Source§impl From<&Pack> for ContainerInfo
impl From<&Pack> for ContainerInfo
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 ContainerInfo
impl RefUnwindSafe for ContainerInfo
impl Send for ContainerInfo
impl Sync for ContainerInfo
impl Unpin for ContainerInfo
impl UnsafeUnpin for ContainerInfo
impl UnwindSafe for ContainerInfo
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.