Struct dodo::Memory [−][src]
pub struct Memory { /* fields omitted */ }
Memory storage.
This storage is quite inefficient and should only be used for testing purposes or prototyping.
Locking strategy
This storage does not have any entry locking mechanism. However, it guarantees that data will not be modified while reading it.
Because there is no locking, multiple writers are allowed, causing potential data loss in certain race condition scenarios.
Implementations
Trait Implementations
impl Storage for Memory
[src]
impl Storage for Memory
[src]type Read = BytesReader
Reader.
type Write = BytesWriter
Writer.
type Iterator = IntoIter<Result<Uuid>>
Iterator.
fn new(&mut self) -> Result<(Uuid, Self::Write)>
[src]
fn read(&self, entry: Uuid) -> Result<Self::Read>
[src]
fn write(&mut self, entry: Uuid) -> Result<Self::Write>
[src]
fn overwrite(&mut self, entry: Uuid) -> Result<Self::Write>
[src]
fn delete(&mut self, entry: Uuid) -> Result<bool>
[src]
fn clear(&mut self) -> Result<()>
[src]
fn iter(&self) -> Result<Self::Iterator>
[src]
Auto Trait Implementations
impl RefUnwindSafe for Memory
impl RefUnwindSafe for Memory
impl UnwindSafe for Memory
impl UnwindSafe for Memory