[][src]Trait rkv::backend::BackendRwTransaction

pub trait BackendRwTransaction: Debug {
    type Error: BackendError;
    type Database: BackendDatabase;
    type Flags: BackendWriteFlags;
    fn get(&self, db: &Self::Database, key: &[u8]) -> Result<&[u8], Self::Error>;
fn put(
        &mut self,
        db: &Self::Database,
        key: &[u8],
        value: &[u8],
        flags: Self::Flags
    ) -> Result<(), Self::Error>;
fn del(
        &mut self,
        db: &Self::Database,
        key: &[u8],
        value: Option<&[u8]>
    ) -> Result<(), Self::Error>;
fn clear_db(&mut self, db: &Self::Database) -> Result<(), Self::Error>;
fn commit(self) -> Result<(), Self::Error>;
fn abort(self); }

Associated Types

Loading content...

Required methods

fn get(&self, db: &Self::Database, key: &[u8]) -> Result<&[u8], Self::Error>

fn put(
    &mut self,
    db: &Self::Database,
    key: &[u8],
    value: &[u8],
    flags: Self::Flags
) -> Result<(), Self::Error>

fn del(
    &mut self,
    db: &Self::Database,
    key: &[u8],
    value: Option<&[u8]>
) -> Result<(), Self::Error>

fn clear_db(&mut self, db: &Self::Database) -> Result<(), Self::Error>

fn commit(self) -> Result<(), Self::Error>

fn abort(self)

Loading content...

Implementors

impl<'t> BackendRwTransaction for rkv::backend::LmdbRwTransaction<'t>[src]

type Database = DatabaseImpl

type Error = ErrorImpl

type Flags = WriteFlagsImpl

impl<'t> BackendRwTransaction for rkv::backend::SafeModeRwTransaction<'t>[src]

type Database = DatabaseImpl

type Error = ErrorImpl

type Flags = WriteFlagsImpl

Loading content...