Trait DbTxMut
pub trait DbTxMut: Send + Sync {
type CursorMut<T: Table>: DbCursorRW<T> + DbCursorRO<T> + Send + Sync;
type DupCursorMut<T: DupSort>: DbDupCursorRW<T> + DbCursorRW<T> + DbDupCursorRO<T> + DbCursorRO<T> + Send + Sync;
// Required methods
fn put<T>(
&self,
key: <T as Table>::Key,
value: <T as Table>::Value,
) -> Result<(), DatabaseError>
where T: Table;
fn delete<T>(
&self,
key: <T as Table>::Key,
value: Option<<T as Table>::Value>,
) -> Result<bool, DatabaseError>
where T: Table;
fn clear<T>(&self) -> Result<(), DatabaseError>
where T: Table;
fn cursor_write<T>(&self) -> Result<Self::CursorMut<T>, DatabaseError>
where T: Table;
fn cursor_dup_write<T>(
&self,
) -> Result<Self::DupCursorMut<T>, DatabaseError>
where T: DupSort;
}
Expand description
Read write transaction that allows writing to database
Required Associated Types§
type CursorMut<T: Table>: DbCursorRW<T> + DbCursorRO<T> + Send + Sync
type CursorMut<T: Table>: DbCursorRW<T> + DbCursorRO<T> + Send + Sync
Read-Write Cursor type
type DupCursorMut<T: DupSort>: DbDupCursorRW<T> + DbCursorRW<T> + DbDupCursorRO<T> + DbCursorRO<T> + Send + Sync
type DupCursorMut<T: DupSort>: DbDupCursorRW<T> + DbCursorRW<T> + DbDupCursorRO<T> + DbCursorRO<T> + Send + Sync
Read-Write DupCursor
type
Required Methods§
fn put<T>(
&self,
key: <T as Table>::Key,
value: <T as Table>::Value,
) -> Result<(), DatabaseError>where
T: Table,
fn put<T>(
&self,
key: <T as Table>::Key,
value: <T as Table>::Value,
) -> Result<(), DatabaseError>where
T: Table,
Put value to database
fn delete<T>(
&self,
key: <T as Table>::Key,
value: Option<<T as Table>::Value>,
) -> Result<bool, DatabaseError>where
T: Table,
fn delete<T>(
&self,
key: <T as Table>::Key,
value: Option<<T as Table>::Value>,
) -> Result<bool, DatabaseError>where
T: Table,
Delete value from database
fn clear<T>(&self) -> Result<(), DatabaseError>where
T: Table,
fn clear<T>(&self) -> Result<(), DatabaseError>where
T: Table,
Clears database.
fn cursor_write<T>(&self) -> Result<Self::CursorMut<T>, DatabaseError>where
T: Table,
fn cursor_write<T>(&self) -> Result<Self::CursorMut<T>, DatabaseError>where
T: Table,
Cursor mut
fn cursor_dup_write<T>(&self) -> Result<Self::DupCursorMut<T>, DatabaseError>where
T: DupSort,
fn cursor_dup_write<T>(&self) -> Result<Self::DupCursorMut<T>, DatabaseError>where
T: DupSort,
DupCursor
mut.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.