pub enum TransactionAny<K: TransactionKind> {
Local(Transaction<K>),
Remote(RemoteTransaction<K>),
}Variants§
Local(Transaction<K>)
Remote(RemoteTransaction<K>)
Implementations§
Source§impl<K: TransactionKind> TransactionAny<K>
impl<K: TransactionKind> TransactionAny<K>
pub async fn open_db( &self, db: Option<&str>, ) -> Result<DatabaseAny, ClientError>
pub async fn get<V: TableObject>( &self, dbi: u32, key: &[u8], ) -> Result<Option<V>, ClientError>
pub async fn db_stat(&self, db: &DatabaseAny) -> Result<Stat, ClientError>
pub async fn db_stat_with_dbi(&self, dbi: u32) -> Result<Stat, ClientError>
pub async fn cursor_with_dbi( &self, dbi: u32, ) -> Result<CursorAny<K>, ClientError>
pub async fn cursor( &self, db: &DatabaseAny, ) -> Result<CursorAny<K>, ClientError>
Source§impl TransactionAny<RW>
impl TransactionAny<RW>
pub async fn begin_nested_txn(&mut self) -> Result<Self, ClientError>
pub async fn clear_db(&self, dbi: u32) -> Result<(), ClientError>
pub async fn put( &self, dbi: u32, key: &[u8], data: &[u8], flags: WriteFlags, ) -> Result<(), ClientError>
pub async fn del( &self, dbi: u32, key: &[u8], value: Option<&[u8]>, ) -> Result<bool, ClientError>
pub async fn create_db( &self, db: Option<&str>, flags: DatabaseFlags, ) -> Result<DatabaseAny, ClientError>
pub async fn commit(self) -> Result<(bool, CommitLatency), ClientError>
Trait Implementations§
Source§impl<K: Clone + TransactionKind> Clone for TransactionAny<K>
impl<K: Clone + TransactionKind> Clone for TransactionAny<K>
Source§fn clone(&self) -> TransactionAny<K>
fn clone(&self) -> TransactionAny<K>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl<K> Freeze for TransactionAny<K>
impl<K> !RefUnwindSafe for TransactionAny<K>
impl<K> Send for TransactionAny<K>
impl<K> Sync for TransactionAny<K>
impl<K> Unpin for TransactionAny<K>
impl<K> !UnwindSafe for TransactionAny<K>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more