[][src]Struct dodo::Memory

pub struct Memory { /* fields omitted */ }

Memory storage.

This storage is quite inefficient when paired with a repository 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.

Methods

impl Memory[src]

pub fn new() -> Self[src]

Create a new memory storage.

Examples

use dodo::prelude::*;
use dodo::storage::Memory;

fn main() {
    let memory = Memory::new();
}

Trait Implementations

impl Debug for Memory[src]

impl Default for Memory[src]

impl Storage for Memory[src]

type Read = BytesReader

Reader.

type Write = BytesWriter

Writer.

type Iterator = IntoIter<Result<Uuid>>

Iterator.

Auto Trait Implementations

impl RefUnwindSafe for Memory

impl Send for Memory

impl Sync for Memory

impl Unpin for Memory

impl UnwindSafe for Memory

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,