#[non_exhaustive]pub enum ReadSubsetOption {
All,
Percentage(f64),
Size(u64),
IdSubSet((u32, u32)),
}Expand description
Options to specify which subset of packs will be read
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
All
Read all pack files
Percentage(f64)
Read a random subset of pack files with (approximately) the given percentage of total size
Size(u64)
Read a random subset of pack files with (approximately) the given size
IdSubSet((u32, u32))
Read a subset of packfiles based on Ids: Using (1,n) .. (n,n) in separate runs will cover all pack files
Implementations§
Source§impl ReadSubsetOption
impl ReadSubsetOption
fn apply(self, packs: impl IntoIterator<Item = IndexPack>) -> Vec<IndexPack>
fn apply_with_rng( self, packs: impl IntoIterator<Item = IndexPack>, rng: &mut impl Rng, ) -> Vec<IndexPack>
Trait Implementations§
Source§impl Clone for ReadSubsetOption
impl Clone for ReadSubsetOption
Source§fn clone(&self) -> ReadSubsetOption
fn clone(&self) -> ReadSubsetOption
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ReadSubsetOption
impl Debug for ReadSubsetOption
Source§impl Default for ReadSubsetOption
impl Default for ReadSubsetOption
Source§fn default() -> ReadSubsetOption
fn default() -> ReadSubsetOption
Returns the “default value” for a type. Read more
Source§impl FromStr for ReadSubsetOption
impl FromStr for ReadSubsetOption
impl Copy for ReadSubsetOption
Auto Trait Implementations§
impl Freeze for ReadSubsetOption
impl RefUnwindSafe for ReadSubsetOption
impl Send for ReadSubsetOption
impl Sync for ReadSubsetOption
impl Unpin for ReadSubsetOption
impl UnsafeUnpin for ReadSubsetOption
impl UnwindSafe for ReadSubsetOption
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