pub struct MemoryStore { /* private fields */ }Expand description
A SlotStore held in memory, for tests and for running the flow with no
hardware.
It forgets everything when dropped, which is the one thing a real store must not do, so it stands in for storage without pretending to be it.
Implementations§
Trait Implementations§
Source§impl Clone for MemoryStore
impl Clone for MemoryStore
Source§fn clone(&self) -> MemoryStore
fn clone(&self) -> MemoryStore
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 MemoryStore
impl Debug for MemoryStore
Source§impl SlotStore for MemoryStore
impl SlotStore for MemoryStore
Source§fn slot_count(&self) -> u8
fn slot_count(&self) -> u8
Returns how many slots this device has.
Source§fn record(&self, slot: u8) -> Result<SlotRecord>
fn record(&self, slot: u8) -> Result<SlotRecord>
Reads what the device believes about a slot. Read more
Source§fn set_record(&mut self, slot: u8, record: SlotRecord) -> Result<()>
fn set_record(&mut self, slot: u8, record: SlotRecord) -> Result<()>
Writes what the device believes about a slot, durably. Read more
Source§fn erase(&mut self, slot: u8) -> Result<()>
fn erase(&mut self, slot: u8) -> Result<()>
Clears a slot’s contents and marks it empty. Read more
Auto Trait Implementations§
impl Freeze for MemoryStore
impl RefUnwindSafe for MemoryStore
impl Send for MemoryStore
impl Sync for MemoryStore
impl Unpin for MemoryStore
impl UnsafeUnpin for MemoryStore
impl UnwindSafe for MemoryStore
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