pub struct StoreDriverOff { /* private fields */ }Expand description
Keeps a power-off store and its potential models in sync.
Implementations§
Source§impl StoreDriverOff
impl StoreDriverOff
Sourcepub fn new(options: BufferOptions, num_pages: usize) -> StoreDriverOff
pub fn new(options: BufferOptions, num_pages: usize) -> StoreDriverOff
Starts a simulation with a clean storage given its configuration.
Sourcepub fn new_dirty(storage: BufferStorage) -> StoreDriverOff
pub fn new_dirty(storage: BufferStorage) -> StoreDriverOff
Starts a simulation from an existing storage.
Sourcepub fn storage(&self) -> &BufferStorage
pub fn storage(&self) -> &BufferStorage
Provides read-only access to the storage.
Sourcepub fn storage_mut(&mut self) -> &mut BufferStorage
pub fn storage_mut(&mut self) -> &mut BufferStorage
Provides mutable access to the storage.
Sourcepub fn model(&self) -> &StoreModel
pub fn model(&self) -> &StoreModel
Provides read-only access to the model.
Sourcepub fn power_on(self) -> Result<StoreDriverOn, StoreInvariant>
pub fn power_on(self) -> Result<StoreDriverOn, StoreInvariant>
Sourcepub fn partial_power_on(
self,
interruption: StoreInterruption<'_>,
) -> Result<StoreDriver, (BufferStorage, StoreInvariant)>
pub fn partial_power_on( self, interruption: StoreInterruption<'_>, ) -> Result<StoreDriver, (BufferStorage, StoreInvariant)>
Powers on the store with a possible interruption.
Sourcepub fn count_operations(&self) -> Option<usize>
pub fn count_operations(&self) -> Option<usize>
Returns the number of storage operations to power on.
Returns None if the store cannot power on successfully.
Trait Implementations§
Source§impl Clone for StoreDriverOff
impl Clone for StoreDriverOff
Source§fn clone(&self) -> StoreDriverOff
fn clone(&self) -> StoreDriverOff
Returns a duplicate 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 moreAuto Trait Implementations§
impl Freeze for StoreDriverOff
impl RefUnwindSafe for StoreDriverOff
impl Send for StoreDriverOff
impl Sync for StoreDriverOff
impl Unpin for StoreDriverOff
impl UnwindSafe for StoreDriverOff
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