Struct proptest::test_runner::MapFailurePersistence
source · pub struct MapFailurePersistence {
pub map: BTreeMap<&'static str, BTreeSet<PersistedSeed>>,
}
Expand description
Failure persistence option that loads and saves seeds in memory
on the heap. This may be useful when accumulating test failures
across multiple TestRunner
instances for external reporting
or batched persistence.
Fields§
§map: BTreeMap<&'static str, BTreeSet<PersistedSeed>>
Backing map, keyed by source_file.
Trait Implementations§
source§impl Clone for MapFailurePersistence
impl Clone for MapFailurePersistence
source§fn clone(&self) -> MapFailurePersistence
fn clone(&self) -> MapFailurePersistence
Returns a copy 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 MapFailurePersistence
impl Debug for MapFailurePersistence
source§impl Default for MapFailurePersistence
impl Default for MapFailurePersistence
source§fn default() -> MapFailurePersistence
fn default() -> MapFailurePersistence
Returns the “default value” for a type. Read more
source§impl FailurePersistence for MapFailurePersistence
impl FailurePersistence for MapFailurePersistence
source§fn load_persisted_failures2(
&self,
source_file: Option<&'static str>,
) -> Vec<PersistedSeed>
fn load_persisted_failures2( &self, source_file: Option<&'static str>, ) -> Vec<PersistedSeed>
Supply seeds associated with the given
source_file
that may be used
by a TestRunner
’s random number generator in order to consistently
recreate a previously-failing Strategy
-provided value. Read moresource§fn save_persisted_failure2(
&mut self,
source_file: Option<&'static str>,
seed: PersistedSeed,
_shrunken_value: &dyn Debug,
)
fn save_persisted_failure2( &mut self, source_file: Option<&'static str>, seed: PersistedSeed, _shrunken_value: &dyn Debug, )
Store a new failure-generating seed associated with the given
source_file
. Read moresource§fn box_clone(&self) -> Box<dyn FailurePersistence>
fn box_clone(&self) -> Box<dyn FailurePersistence>
Delegate method for producing a trait object usable with
Clone
source§fn eq(&self, other: &dyn FailurePersistence) -> bool
fn eq(&self, other: &dyn FailurePersistence) -> bool
Equality testing delegate required due to constraints of trait objects.
source§impl PartialEq for MapFailurePersistence
impl PartialEq for MapFailurePersistence
impl StructuralPartialEq for MapFailurePersistence
Auto Trait Implementations§
impl Freeze for MapFailurePersistence
impl RefUnwindSafe for MapFailurePersistence
impl Send for MapFailurePersistence
impl Sync for MapFailurePersistence
impl Unpin for MapFailurePersistence
impl UnwindSafe for MapFailurePersistence
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§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)