use core::fmt;
use core::any::Any;
#[cfg(all(feature = "alloc", not(feature = "std")))]
use alloc::boxed::Box;
#[cfg(feature = "std")]
use std::boxed::Box;
#[cfg(all(feature = "alloc", not(feature = "std")))]
use alloc::vec::Vec;
#[cfg(feature = "std")]
use std::vec::Vec;
#[cfg(feature = "std")]
mod file;
mod map;
mod noop;
#[cfg(feature = "std")]
pub use self::file::*;
pub use self::map::*;
pub use self::noop::*;
pub trait FailurePersistence: Send + Sync + fmt::Debug {
fn load_persisted_failures(&self, source_file: Option<&'static str>) -> Vec<[u32; 4]>;
fn save_persisted_failure(
&mut self,
source_file: Option<&'static str>,
seed: [u32; 4],
shrunken_value: &fmt::Debug,
);
fn box_clone(&self) -> Box<FailurePersistence>;
fn eq(&self, other: &FailurePersistence) -> bool;
fn as_any(&self) -> &Any;
}
impl<'a, 'b> PartialEq<FailurePersistence+'b> for FailurePersistence+'a {
fn eq(&self, other: &(FailurePersistence+'b)) -> bool {
FailurePersistence::eq(self, other)
}
}
impl Clone for Box<FailurePersistence> {
fn clone(&self) -> Box<FailurePersistence> {
self.box_clone()
}
}