diff --git a/libraries/persistent_store/fuzz/src/store.rs b/libraries/persistent_store/fuzz/src/store.rs index b10c495..9e83587 100644 --- a/libraries/persistent_store/fuzz/src/store.rs +++ b/libraries/persistent_store/fuzz/src/store.rs @@ -53,6 +53,7 @@ pub fn fuzz(mut data: &[u8], debug: bool, stats: Option<&mut Stats>) { driver.check().unwrap(); } if fuzzer.debug { + println!("{:?}", driver.model().content()); println!("----------------------------------------------------------------------"); } } diff --git a/libraries/persistent_store/src/driver.rs b/libraries/persistent_store/src/driver.rs index 5889651..3f02ab5 100644 --- a/libraries/persistent_store/src/driver.rs +++ b/libraries/persistent_store/src/driver.rs @@ -200,6 +200,14 @@ impl StoreDriver { } } + /// Provides read-only access to the model. + pub fn model(&self) -> &StoreModel { + match self { + StoreDriver::On(x) => x.model(), + StoreDriver::Off(x) => x.model(), + } + } + /// Extracts the power-on version of the driver. pub fn on(self) -> Option { match self {