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