[][src]Struct agilulf::Database

pub struct Database { /* fields omitted */ }

A Database with LevelDB algorithm. (Though the compaction of sstable is not implemented yet)

Now it will freeze exceeded MemDatabase into frozen_databases list. Then a background thread will write the frozen database into disk and modify the MANIFEST.

Trait Implementations

impl AsyncDatabase for Database[src]

fn get(
    &self,
    key: Slice
) -> Pin<Box<dyn Future<Output = DatabaseResult<Slice>> + Send>>
[src]

GET request for the database will firstly read from MemDatabase. And then read from frozen database . Then will find in SSTable. If they are all not found, error will be returned.

fn put(
    &self,
    key: Slice,
    value: Slice
) -> Pin<Box<dyn Future<Output = DatabaseResult<()>> + Send>>
[src]

PUT request to this database will simply run PUT command on MemDatabase and check whether MemDatabase is so big that needs to freeze.

fn scan(
    &self,
    start: Slice,
    end: Slice
) -> Pin<Box<dyn Future<Output = Vec<(Slice, Slice)>> + Send>>
[src]

SCAN operation will merge every iterator from MemDatabase and FrozenDatabase and SStable together and return.

Auto Trait Implementations

impl Send for Database

impl Unpin for Database

impl Sync for Database

impl !UnwindSafe for Database

impl !RefUnwindSafe for Database

Blanket Implementations

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

impl<T> BorrowMut<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> Erased for T