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: Table>(
&self,
key: T::Key,
value: T::Value,
) -> Result<(), DatabaseError>;
fn delete<T: Table>(
&self,
key: T::Key,
value: Option<T::Value>,
) -> Result<bool, DatabaseError>;
fn clear<T: Table>(&self) -> Result<(), DatabaseError>;
fn cursor_write<T: Table>(
&self,
) -> Result<Self::CursorMut<T>, DatabaseError>;
fn cursor_dup_write<T: DupSort>(
&self,
) -> Result<Self::DupCursorMut<T>, DatabaseError>;
}
Expand description
Read write transaction that allows writing to database
Required Associated Types§
Sourcetype CursorMut<T: Table>: DbCursorRW<T> + DbCursorRO<T> + Send + Sync
type CursorMut<T: Table>: DbCursorRW<T> + DbCursorRO<T> + Send + Sync
Read-Write Cursor type
Sourcetype 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§
Sourcefn put<T: Table>(
&self,
key: T::Key,
value: T::Value,
) -> Result<(), DatabaseError>
fn put<T: Table>( &self, key: T::Key, value: T::Value, ) -> Result<(), DatabaseError>
Put value to database
Sourcefn delete<T: Table>(
&self,
key: T::Key,
value: Option<T::Value>,
) -> Result<bool, DatabaseError>
fn delete<T: Table>( &self, key: T::Key, value: Option<T::Value>, ) -> Result<bool, DatabaseError>
Delete value from database
Sourcefn cursor_write<T: Table>(&self) -> Result<Self::CursorMut<T>, DatabaseError>
fn cursor_write<T: Table>(&self) -> Result<Self::CursorMut<T>, DatabaseError>
Cursor mut
Sourcefn cursor_dup_write<T: DupSort>(
&self,
) -> Result<Self::DupCursorMut<T>, DatabaseError>
fn cursor_dup_write<T: DupSort>( &self, ) -> Result<Self::DupCursorMut<T>, DatabaseError>
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.