pub struct TransactionDB<T = MultiThreaded>where
T: ThreadMode,{ /* private fields */ }Expand description
RocksDB TransactionDB.
Please read the official guide to learn more about RocksDB TransactionDB.
The default thread mode for TransactionDB is SingleThreaded
if feature multi-threaded-cf is not enabled.
use rust_rocksdb::{DB, Options, TransactionDB, SingleThreaded};
let tempdir = tempfile::Builder::new()
.prefix("_path_for_transaction_db")
.tempdir()
.expect("Failed to create temporary path for the _path_for_transaction_db");
let path = tempdir.path();
{
let db: TransactionDB = TransactionDB::open_default(path).unwrap();
db.put(b"my key", b"my value").unwrap();
// create transaction
let txn = db.transaction();
txn.put(b"key2", b"value2");
txn.put(b"key3", b"value3");
txn.commit().unwrap();
}
let _ = DB::destroy(&Options::default(), path);Implementations§
Source§impl<T> TransactionDB<T>where
T: ThreadMode,
impl<T> TransactionDB<T>where
T: ThreadMode,
Sourcepub fn open_default<P>(path: P) -> Result<TransactionDB<T>, Error>
pub fn open_default<P>(path: P) -> Result<TransactionDB<T>, Error>
Opens a database with default options.
Sourcepub fn open<P>(
opts: &Options,
txn_db_opts: &TransactionDBOptions,
path: P,
) -> Result<TransactionDB<T>, Error>
pub fn open<P>( opts: &Options, txn_db_opts: &TransactionDBOptions, path: P, ) -> Result<TransactionDB<T>, Error>
Opens the database with the specified options.
Sourcepub fn open_cf<P, I, N>(
opts: &Options,
txn_db_opts: &TransactionDBOptions,
path: P,
cfs: I,
) -> Result<TransactionDB<T>, Error>
pub fn open_cf<P, I, N>( opts: &Options, txn_db_opts: &TransactionDBOptions, path: P, cfs: I, ) -> Result<TransactionDB<T>, Error>
Opens a database with the given database options and column family names.
Column families opened using this function will be created with default Options.
Sourcepub fn open_cf_descriptors<P, I>(
opts: &Options,
txn_db_opts: &TransactionDBOptions,
path: P,
cfs: I,
) -> Result<TransactionDB<T>, Error>
pub fn open_cf_descriptors<P, I>( opts: &Options, txn_db_opts: &TransactionDBOptions, path: P, cfs: I, ) -> Result<TransactionDB<T>, Error>
Opens a database with the given database options and column family descriptors.
pub fn list_cf<P>(opts: &Options, path: P) -> Result<Vec<String>, Error>
pub fn destroy<P>(opts: &Options, path: P) -> Result<(), Error>
pub fn repair<P>(opts: &Options, path: P) -> Result<(), Error>
pub fn path(&self) -> &Path
Sourcepub fn transaction(&self) -> Transaction<'_, TransactionDB<T>>
pub fn transaction(&self) -> Transaction<'_, TransactionDB<T>>
Creates a transaction with default options.
Sourcepub fn transaction_opt<'a>(
&'a self,
write_opts: &WriteOptions,
txn_opts: &TransactionOptions,
) -> Transaction<'a, TransactionDB<T>>
pub fn transaction_opt<'a>( &'a self, write_opts: &WriteOptions, txn_opts: &TransactionOptions, ) -> Transaction<'a, TransactionDB<T>>
Creates a transaction with options.
Sourcepub fn prepared_transactions(&self) -> Vec<Transaction<'_, TransactionDB<T>>>
pub fn prepared_transactions(&self) -> Vec<Transaction<'_, TransactionDB<T>>>
Get all prepared transactions for recovery.
This function is expected to call once after open database. User should commit or rollback all transactions before start other transactions.
Sourcepub fn get<K>(&self, key: K) -> Result<Option<Vec<u8>>, Error>
pub fn get<K>(&self, key: K) -> Result<Option<Vec<u8>>, Error>
Returns the bytes associated with a key value.
Sourcepub fn get_cf<K>(
&self,
cf: &impl AsColumnFamilyRef,
key: K,
) -> Result<Option<Vec<u8>>, Error>
pub fn get_cf<K>( &self, cf: &impl AsColumnFamilyRef, key: K, ) -> Result<Option<Vec<u8>>, Error>
Returns the bytes associated with a key value and the given column family.
Sourcepub fn get_opt<K>(
&self,
key: K,
readopts: &ReadOptions,
) -> Result<Option<Vec<u8>>, Error>
pub fn get_opt<K>( &self, key: K, readopts: &ReadOptions, ) -> Result<Option<Vec<u8>>, Error>
Returns the bytes associated with a key value with read options.
Sourcepub fn get_cf_opt<K>(
&self,
cf: &impl AsColumnFamilyRef,
key: K,
readopts: &ReadOptions,
) -> Result<Option<Vec<u8>>, Error>
pub fn get_cf_opt<K>( &self, cf: &impl AsColumnFamilyRef, key: K, readopts: &ReadOptions, ) -> Result<Option<Vec<u8>>, Error>
Returns the bytes associated with a key value and the given column family with read options.
pub fn get_pinned<K>( &self, key: K, ) -> Result<Option<DBPinnableSlice<'_>>, Error>
Sourcepub fn get_pinned_cf<K>(
&self,
cf: &impl AsColumnFamilyRef,
key: K,
) -> Result<Option<DBPinnableSlice<'_>>, Error>
pub fn get_pinned_cf<K>( &self, cf: &impl AsColumnFamilyRef, key: K, ) -> Result<Option<DBPinnableSlice<'_>>, Error>
Returns the bytes associated with a key value and the given column family.
Sourcepub fn get_pinned_opt<K>(
&self,
key: K,
readopts: &ReadOptions,
) -> Result<Option<DBPinnableSlice<'_>>, Error>
pub fn get_pinned_opt<K>( &self, key: K, readopts: &ReadOptions, ) -> Result<Option<DBPinnableSlice<'_>>, Error>
Returns the bytes associated with a key value with read options.
Sourcepub fn get_pinned_cf_opt<K>(
&self,
cf: &impl AsColumnFamilyRef,
key: K,
readopts: &ReadOptions,
) -> Result<Option<DBPinnableSlice<'_>>, Error>
pub fn get_pinned_cf_opt<K>( &self, cf: &impl AsColumnFamilyRef, key: K, readopts: &ReadOptions, ) -> Result<Option<DBPinnableSlice<'_>>, Error>
Returns the bytes associated with a key value and the given column family with read options.
Sourcepub fn multi_get<K, I>(&self, keys: I) -> Vec<Result<Option<Vec<u8>>, Error>>
pub fn multi_get<K, I>(&self, keys: I) -> Vec<Result<Option<Vec<u8>>, Error>>
Return the values associated with the given keys.
Sourcepub fn multi_get_opt<K, I>(
&self,
keys: I,
readopts: &ReadOptions,
) -> Vec<Result<Option<Vec<u8>>, Error>>
pub fn multi_get_opt<K, I>( &self, keys: I, readopts: &ReadOptions, ) -> Vec<Result<Option<Vec<u8>>, Error>>
Return the values associated with the given keys using read options.
Sourcepub fn multi_get_cf<'a, 'b, K, I, W>(
&'a self,
keys: I,
) -> Vec<Result<Option<Vec<u8>>, Error>>
pub fn multi_get_cf<'a, 'b, K, I, W>( &'a self, keys: I, ) -> Vec<Result<Option<Vec<u8>>, Error>>
Return the values associated with the given keys and column families.
Sourcepub fn multi_get_cf_opt<'a, 'b, K, I, W>(
&'a self,
keys: I,
readopts: &ReadOptions,
) -> Vec<Result<Option<Vec<u8>>, Error>>
pub fn multi_get_cf_opt<'a, 'b, K, I, W>( &'a self, keys: I, readopts: &ReadOptions, ) -> Vec<Result<Option<Vec<u8>>, Error>>
Return the values associated with the given keys and column families using read options.
pub fn put<K, V>(&self, key: K, value: V) -> Result<(), Error>
pub fn put_cf<K, V>( &self, cf: &impl AsColumnFamilyRef, key: K, value: V, ) -> Result<(), Error>
pub fn put_opt<K, V>( &self, key: K, value: V, writeopts: &WriteOptions, ) -> Result<(), Error>
pub fn put_cf_opt<K, V>( &self, cf: &impl AsColumnFamilyRef, key: K, value: V, writeopts: &WriteOptions, ) -> Result<(), Error>
pub fn write( &self, batch: &WriteBatchWithTransaction<true>, ) -> Result<(), Error>
pub fn write_opt( &self, batch: &WriteBatchWithTransaction<true>, writeopts: &WriteOptions, ) -> Result<(), Error>
pub fn merge<K, V>(&self, key: K, value: V) -> Result<(), Error>
pub fn merge_cf<K, V>( &self, cf: &impl AsColumnFamilyRef, key: K, value: V, ) -> Result<(), Error>
pub fn merge_opt<K, V>( &self, key: K, value: V, writeopts: &WriteOptions, ) -> Result<(), Error>
pub fn merge_cf_opt<K, V>( &self, cf: &impl AsColumnFamilyRef, key: K, value: V, writeopts: &WriteOptions, ) -> Result<(), Error>
pub fn delete<K>(&self, key: K) -> Result<(), Error>
pub fn delete_cf<K>( &self, cf: &impl AsColumnFamilyRef, key: K, ) -> Result<(), Error>
pub fn delete_opt<K>( &self, key: K, writeopts: &WriteOptions, ) -> Result<(), Error>
pub fn delete_cf_opt<K>( &self, cf: &impl AsColumnFamilyRef, key: K, writeopts: &WriteOptions, ) -> Result<(), Error>
pub fn iterator<'a, 'b>(
&'a self,
mode: IteratorMode<'_>,
) -> DBIteratorWithThreadMode<'b, TransactionDB<T>>where
'a: 'b,
pub fn iterator_opt<'a, 'b>(
&'a self,
mode: IteratorMode<'_>,
readopts: ReadOptions,
) -> DBIteratorWithThreadMode<'b, TransactionDB<T>>where
'a: 'b,
Sourcepub fn iterator_cf_opt<'a, 'b>(
&'a self,
cf_handle: &impl AsColumnFamilyRef,
readopts: ReadOptions,
mode: IteratorMode<'_>,
) -> DBIteratorWithThreadMode<'b, TransactionDB<T>>where
'a: 'b,
pub fn iterator_cf_opt<'a, 'b>(
&'a self,
cf_handle: &impl AsColumnFamilyRef,
readopts: ReadOptions,
mode: IteratorMode<'_>,
) -> DBIteratorWithThreadMode<'b, TransactionDB<T>>where
'a: 'b,
Opens an iterator using the provided ReadOptions. This is used when you want to iterate over a specific ColumnFamily with a modified ReadOptions
Sourcepub fn full_iterator<'a, 'b>(
&'a self,
mode: IteratorMode<'_>,
) -> DBIteratorWithThreadMode<'b, TransactionDB<T>>where
'a: 'b,
pub fn full_iterator<'a, 'b>(
&'a self,
mode: IteratorMode<'_>,
) -> DBIteratorWithThreadMode<'b, TransactionDB<T>>where
'a: 'b,
Opens an iterator with set_total_order_seek enabled.
This must be used to iterate across prefixes when set_memtable_factory has been called
with a Hash-based implementation.
pub fn prefix_iterator<'a, 'b, P>( &'a self, prefix: P, ) -> DBIteratorWithThreadMode<'b, TransactionDB<T>>
pub fn iterator_cf<'a, 'b>(
&'a self,
cf_handle: &impl AsColumnFamilyRef,
mode: IteratorMode<'_>,
) -> DBIteratorWithThreadMode<'b, TransactionDB<T>>where
'a: 'b,
pub fn full_iterator_cf<'a, 'b>(
&'a self,
cf_handle: &impl AsColumnFamilyRef,
mode: IteratorMode<'_>,
) -> DBIteratorWithThreadMode<'b, TransactionDB<T>>where
'a: 'b,
pub fn prefix_iterator_cf<'a, P>( &'a self, cf_handle: &impl AsColumnFamilyRef, prefix: P, ) -> DBIteratorWithThreadMode<'a, TransactionDB<T>>
Sourcepub fn raw_iterator<'a, 'b>(
&'a self,
) -> DBRawIteratorWithThreadMode<'b, TransactionDB<T>>where
'a: 'b,
pub fn raw_iterator<'a, 'b>(
&'a self,
) -> DBRawIteratorWithThreadMode<'b, TransactionDB<T>>where
'a: 'b,
Opens a raw iterator over the database, using the default read options
Sourcepub fn raw_iterator_cf<'a, 'b>(
&'a self,
cf_handle: &impl AsColumnFamilyRef,
) -> DBRawIteratorWithThreadMode<'b, TransactionDB<T>>where
'a: 'b,
pub fn raw_iterator_cf<'a, 'b>(
&'a self,
cf_handle: &impl AsColumnFamilyRef,
) -> DBRawIteratorWithThreadMode<'b, TransactionDB<T>>where
'a: 'b,
Opens a raw iterator over the given column family, using the default read options
Sourcepub fn raw_iterator_opt<'a, 'b>(
&'a self,
readopts: ReadOptions,
) -> DBRawIteratorWithThreadMode<'b, TransactionDB<T>>where
'a: 'b,
pub fn raw_iterator_opt<'a, 'b>(
&'a self,
readopts: ReadOptions,
) -> DBRawIteratorWithThreadMode<'b, TransactionDB<T>>where
'a: 'b,
Opens a raw iterator over the database, using the given read options
Sourcepub fn raw_iterator_cf_opt<'a, 'b>(
&'a self,
cf_handle: &impl AsColumnFamilyRef,
readopts: ReadOptions,
) -> DBRawIteratorWithThreadMode<'b, TransactionDB<T>>where
'a: 'b,
pub fn raw_iterator_cf_opt<'a, 'b>(
&'a self,
cf_handle: &impl AsColumnFamilyRef,
readopts: ReadOptions,
) -> DBRawIteratorWithThreadMode<'b, TransactionDB<T>>where
'a: 'b,
Opens a raw iterator over the given column family, using the given read options
pub fn snapshot(&self) -> SnapshotWithThreadMode<'_, TransactionDB<T>>
Source§impl TransactionDB<SingleThreaded>
impl TransactionDB<SingleThreaded>
Source§impl TransactionDB
impl TransactionDB
Sourcepub fn create_cf<N>(&self, name: N, opts: &Options) -> Result<(), Error>
pub fn create_cf<N>(&self, name: N, opts: &Options) -> Result<(), Error>
Creates column family with given name and options.
Sourcepub fn cf_handle(&self, name: &str) -> Option<Arc<BoundColumnFamily<'_>>>
pub fn cf_handle(&self, name: &str) -> Option<Arc<BoundColumnFamily<'_>>>
Returns the underlying column family handle.
Sourcepub fn drop_cf(&self, name: &str) -> Result<(), Error>
pub fn drop_cf(&self, name: &str) -> Result<(), Error>
Drops the column family with the given name by internally locking the inner column
family map. This avoids needing &mut self reference
Trait Implementations§
Source§impl<T> DBAccess for TransactionDB<T>where
T: ThreadMode,
impl<T> DBAccess for TransactionDB<T>where
T: ThreadMode,
unsafe fn create_snapshot(&self) -> *const rocksdb_snapshot_t
unsafe fn release_snapshot(&self, snapshot: *const rocksdb_snapshot_t)
unsafe fn create_iterator( &self, readopts: &ReadOptions, ) -> *mut rocksdb_iterator_t
unsafe fn create_iterator_cf( &self, cf_handle: *mut rocksdb_column_family_handle_t, readopts: &ReadOptions, ) -> *mut rocksdb_iterator_t
fn get_opt<K>( &self, key: K, readopts: &ReadOptions, ) -> Result<Option<Vec<u8>>, Error>
fn get_cf_opt<K>( &self, cf: &impl AsColumnFamilyRef, key: K, readopts: &ReadOptions, ) -> Result<Option<Vec<u8>>, Error>
fn get_pinned_opt<K>( &self, key: K, readopts: &ReadOptions, ) -> Result<Option<DBPinnableSlice<'_>>, Error>
fn get_pinned_cf_opt<K>( &self, cf: &impl AsColumnFamilyRef, key: K, readopts: &ReadOptions, ) -> Result<Option<DBPinnableSlice<'_>>, Error>
fn multi_get_opt<K, I>( &self, keys: I, readopts: &ReadOptions, ) -> Vec<Result<Option<Vec<u8>>, Error>>
fn multi_get_cf_opt<'b, K, I, W>( &self, keys_cf: I, readopts: &ReadOptions, ) -> Vec<Result<Option<Vec<u8>>, Error>>
Source§impl<T> Drop for TransactionDB<T>where
T: ThreadMode,
impl<T> Drop for TransactionDB<T>where
T: ThreadMode,
impl<T> Send for TransactionDB<T>where
T: ThreadMode,
impl<T> Sync for TransactionDB<T>where
T: ThreadMode,
Auto Trait Implementations§
impl<T = MultiThreaded> !Freeze for TransactionDB<T>
impl<T> RefUnwindSafe for TransactionDB<T>where
T: RefUnwindSafe,
impl<T> Unpin for TransactionDB<T>where
T: Unpin,
impl<T> UnwindSafe for TransactionDB<T>where
T: UnwindSafe,
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
Source§impl<T> FmtForward for T
impl<T> FmtForward for T
Source§fn fmt_binary(self) -> FmtBinary<Self>where
Self: Binary,
fn fmt_binary(self) -> FmtBinary<Self>where
Self: Binary,
self to use its Binary implementation when Debug-formatted.Source§fn fmt_display(self) -> FmtDisplay<Self>where
Self: Display,
fn fmt_display(self) -> FmtDisplay<Self>where
Self: Display,
self to use its Display implementation when
Debug-formatted.Source§fn fmt_lower_exp(self) -> FmtLowerExp<Self>where
Self: LowerExp,
fn fmt_lower_exp(self) -> FmtLowerExp<Self>where
Self: LowerExp,
self to use its LowerExp implementation when
Debug-formatted.Source§fn fmt_lower_hex(self) -> FmtLowerHex<Self>where
Self: LowerHex,
fn fmt_lower_hex(self) -> FmtLowerHex<Self>where
Self: LowerHex,
self to use its LowerHex implementation when
Debug-formatted.Source§fn fmt_octal(self) -> FmtOctal<Self>where
Self: Octal,
fn fmt_octal(self) -> FmtOctal<Self>where
Self: Octal,
self to use its Octal implementation when Debug-formatted.Source§fn fmt_pointer(self) -> FmtPointer<Self>where
Self: Pointer,
fn fmt_pointer(self) -> FmtPointer<Self>where
Self: Pointer,
self to use its Pointer implementation when
Debug-formatted.Source§fn fmt_upper_exp(self) -> FmtUpperExp<Self>where
Self: UpperExp,
fn fmt_upper_exp(self) -> FmtUpperExp<Self>where
Self: UpperExp,
self to use its UpperExp implementation when
Debug-formatted.Source§fn fmt_upper_hex(self) -> FmtUpperHex<Self>where
Self: UpperHex,
fn fmt_upper_hex(self) -> FmtUpperHex<Self>where
Self: UpperHex,
self to use its UpperHex implementation when
Debug-formatted.Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> Pipe for Twhere
T: ?Sized,
impl<T> Pipe for Twhere
T: ?Sized,
Source§fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
Source§fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere
R: 'a,
fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere
R: 'a,
self and passes that borrow into the pipe function. Read moreSource§fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere
R: 'a,
fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere
R: 'a,
self and passes that borrow into the pipe function. Read moreSource§fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
Source§fn pipe_borrow_mut<'a, B, R>(
&'a mut self,
func: impl FnOnce(&'a mut B) -> R,
) -> R
fn pipe_borrow_mut<'a, B, R>( &'a mut self, func: impl FnOnce(&'a mut B) -> R, ) -> R
Source§fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
self, then passes self.as_ref() into the pipe function.Source§fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
self, then passes self.as_mut() into the pipe
function.Source§fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
self, then passes self.deref() into the pipe function.Source§impl<T> Tap for T
impl<T> Tap for T
Source§fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
Borrow<B> of a value. Read moreSource§fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
BorrowMut<B> of a value. Read moreSource§fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
AsRef<R> view of a value. Read moreSource§fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
AsMut<R> view of a value. Read moreSource§fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
Deref::Target of a value. Read moreSource§fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
Deref::Target of a value. Read moreSource§fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self
fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self
.tap() only in debug builds, and is erased in release builds.Source§fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self
fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self
.tap_mut() only in debug builds, and is erased in release
builds.Source§fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
.tap_borrow() only in debug builds, and is erased in release
builds.Source§fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
.tap_borrow_mut() only in debug builds, and is erased in release
builds.Source§fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
.tap_ref() only in debug builds, and is erased in release
builds.Source§fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
.tap_ref_mut() only in debug builds, and is erased in release
builds.Source§fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
.tap_deref() only in debug builds, and is erased in release
builds.