Also debug the model besides the storage

This commit is contained in:
Julien Cretin
2021-09-25 15:43:20 +02:00
committed by Julien Cretin
parent fbca34b1d1
commit a3965eac2d
2 changed files with 9 additions and 0 deletions

View File

@@ -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<StoreDriverOn> {
match self {