pub struct TestArchiveConfig {
pub name: String,
pub version: FormatVersion,
pub files: Vec<TestFile>,
pub hash_table_size: Option<u32>,
pub block_size: Option<u8>,
pub include_listfile: bool,
pub include_attributes: bool,
}Available on crate features
test-utils only.Expand description
Configuration for creating test MPQ archives
Fields§
§name: StringName of the archive (used for filename)
version: FormatVersionMPQ format version to use
files: Vec<TestFile>List of files to include in the archive
hash_table_size: Option<u32>Hash table size (if None, automatically determined)
block_size: Option<u8>Block size shift value (sector size = 512 << block_size)
include_listfile: boolWhether to manually include a (listfile) entry
include_attributes: boolWhether to include an (attributes) file
Implementations§
Source§impl TestArchiveConfig
impl TestArchiveConfig
Sourcepub fn minimal(version: FormatVersion) -> Self
pub fn minimal(version: FormatVersion) -> Self
Create a minimal test archive configuration
Sourcepub fn compressed(compression_type: &str) -> Self
pub fn compressed(compression_type: &str) -> Self
Create a compressed files test archive
Sourcepub fn edge_cases() -> Self
pub fn edge_cases() -> Self
Create an edge cases test archive
Sourcepub fn comprehensive(version: FormatVersion) -> Self
pub fn comprehensive(version: FormatVersion) -> Self
Create a comprehensive test archive
Trait Implementations§
Source§impl Clone for TestArchiveConfig
impl Clone for TestArchiveConfig
Auto Trait Implementations§
impl Freeze for TestArchiveConfig
impl RefUnwindSafe for TestArchiveConfig
impl Send for TestArchiveConfig
impl Sync for TestArchiveConfig
impl Unpin for TestArchiveConfig
impl UnsafeUnpin for TestArchiveConfig
impl UnwindSafe for TestArchiveConfig
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> 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> ⓘ
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