[][src]Struct store::MemoryStore

pub struct MemoryStore { /* fields omitted */ }

A thread-safe HashMap wrapper.

Methods

impl MemoryStore[src]

pub fn open() -> Self[src]

Create a new, empty database.

Trait Implementations

impl Store for MemoryStore[src]

fn get_bytes(&self, col: &str, key: &[u8]) -> Result<Option<Vec<u8>>, Error>[src]

Get the value of some key from the database. Returns None if the key does not exist.

fn put_bytes(&self, col: &str, key: &[u8], val: &[u8]) -> Result<(), Error>[src]

Puts a key in the database.

fn key_exists(&self, col: &str, key: &[u8]) -> Result<bool, Error>[src]

Return true if some key exists in some column.

fn key_delete(&self, col: &str, key: &[u8]) -> Result<(), Error>[src]

Delete some key from the database.

impl Clone for MemoryStore[src]

Auto Trait Implementations

impl Send for MemoryStore

impl Unpin for MemoryStore

impl Sync for MemoryStore

impl !UnwindSafe for MemoryStore

impl !RefUnwindSafe for MemoryStore

Blanket Implementations

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

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

impl<T> From<T> for 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<T> BorrowMut<T> for T where
    T: ?Sized
[src]

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

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

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

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T> SendSyncUnwindSafe for T where
    T: Send + Sync + UnwindSafe + ?Sized