pub enum PackageDefinitionSource {
HM3(Vec<u8>),
HM2(Vec<u8>),
HM2016(Vec<u8>),
Custom(Vec<PartitionInfo>),
}
Variants§
Implementations§
Source§impl PackageDefinitionSource
impl PackageDefinitionSource
pub fn from_version(woa_version: WoaVersion, data: Vec<u8>) -> Self
Sourcepub fn from_file(
path: PathBuf,
game_version: WoaVersion,
) -> Result<Self, PackageDefinitionError>
pub fn from_file( path: PathBuf, game_version: WoaVersion, ) -> Result<Self, PackageDefinitionError>
Parses a packagedefinition.txt file.
§Arguments
path
- The path to the packagedefinition.txt file.game_version
- The version of the game.
pub fn read(&self) -> Result<Vec<PartitionInfo>, PackageDefinitionError>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for PackageDefinitionSource
impl RefUnwindSafe for PackageDefinitionSource
impl Send for PackageDefinitionSource
impl Sync for PackageDefinitionSource
impl Unpin for PackageDefinitionSource
impl UnwindSafe for PackageDefinitionSource
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> 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