pub enum ShardingMode {
Slice {
index: usize,
total: usize,
},
Hash {
index: usize,
total: usize,
},
}Expand description
Sharding mode for distributing tests across CI workers.
Variants§
Slice
Round-robin slice assignment — simple but not stable across test additions.
Hash
Hash-based assignment — deterministic and stable across test additions.
Implementations§
Source§impl ShardingMode
impl ShardingMode
Sourcepub fn apply(&self, result: &TestRunResult) -> TestRunResult
pub fn apply(&self, result: &TestRunResult) -> TestRunResult
Apply sharding to a test run result, keeping only tests in this shard.
Sourcepub fn description(&self) -> String
pub fn description(&self) -> String
Return a human-readable description.
Trait Implementations§
Source§impl Clone for ShardingMode
impl Clone for ShardingMode
Source§fn clone(&self) -> ShardingMode
fn clone(&self) -> ShardingMode
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 moreAuto Trait Implementations§
impl Freeze for ShardingMode
impl RefUnwindSafe for ShardingMode
impl Send for ShardingMode
impl Sync for ShardingMode
impl Unpin for ShardingMode
impl UnsafeUnpin for ShardingMode
impl UnwindSafe for ShardingMode
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