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
sourceimpl Clone for MapFailurePersistence
impl Clone for MapFailurePersistence
sourcefn clone(&self) -> MapFailurePersistence
fn clone(&self) -> MapFailurePersistence
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for MapFailurePersistence
impl Debug for MapFailurePersistence
sourceimpl Default for MapFailurePersistence
impl Default for MapFailurePersistence
sourcefn default() -> MapFailurePersistence
fn default() -> MapFailurePersistence
Returns the “default value” for a type. Read more
sourceimpl FailurePersistence for MapFailurePersistence
impl FailurePersistence for MapFailurePersistence
sourcefn load_persisted_failures2(
&self,
source_file: Option<&'static str>
) -> Vec<PersistedSeed>ⓘNotable traits for Vec<u8, A>impl<A> Write for Vec<u8, A> where
A: Allocator,
fn load_persisted_failures2(
&self,
source_file: Option<&'static str>
) -> Vec<PersistedSeed>ⓘNotable traits for Vec<u8, A>impl<A> Write for Vec<u8, A> where
A: Allocator,
A: Allocator,
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 more
sourcefn 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 more
sourcefn box_clone(&self) -> Box<dyn FailurePersistence>ⓘNotable traits for Box<R, Global>impl<R> Read for Box<R, Global> where
R: Read + ?Sized, impl<W> Write for Box<W, Global> where
W: Write + ?Sized, impl<I, A> Iterator for Box<I, A> where
I: Iterator + ?Sized,
A: Allocator, type Item = <I as Iterator>::Item;impl<F, A> Future for Box<F, A> where
F: Future + Unpin + ?Sized,
A: Allocator + 'static, type Output = <F as Future>::Output;
fn box_clone(&self) -> Box<dyn FailurePersistence>ⓘNotable traits for Box<R, Global>impl<R> Read for Box<R, Global> where
R: Read + ?Sized, impl<W> Write for Box<W, Global> where
W: Write + ?Sized, impl<I, A> Iterator for Box<I, A> where
I: Iterator + ?Sized,
A: Allocator, type Item = <I as Iterator>::Item;impl<F, A> Future for Box<F, A> where
F: Future + Unpin + ?Sized,
A: Allocator + 'static, type Output = <F as Future>::Output;
R: Read + ?Sized, impl<W> Write for Box<W, Global> where
W: Write + ?Sized, impl<I, A> Iterator for Box<I, A> where
I: Iterator + ?Sized,
A: Allocator, type Item = <I as Iterator>::Item;impl<F, A> Future for Box<F, A> where
F: Future + Unpin + ?Sized,
A: Allocator + 'static, type Output = <F as Future>::Output;
Delegate method for producing a trait object usable with Clone
sourcefn eq(&self, other: &dyn FailurePersistence) -> bool
fn eq(&self, other: &dyn FailurePersistence) -> bool
Equality testing delegate required due to constraints of trait objects.
sourceimpl PartialEq<MapFailurePersistence> for MapFailurePersistence
impl PartialEq<MapFailurePersistence> for MapFailurePersistence
sourcefn eq(&self, other: &MapFailurePersistence) -> bool
fn eq(&self, other: &MapFailurePersistence) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourcefn ne(&self, other: &MapFailurePersistence) -> bool
fn ne(&self, other: &MapFailurePersistence) -> bool
This method tests for !=
.
impl StructuralPartialEq for MapFailurePersistence
Auto Trait Implementations
impl RefUnwindSafe for MapFailurePersistence
impl Send for MapFailurePersistence
impl Sync for MapFailurePersistence
impl Unpin for MapFailurePersistence
impl UnwindSafe for MapFailurePersistence
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more