pub struct Transaction<'db, DB> { /* private fields */ }Expand description
RocksDB Transaction.
To use transactions, you must first create a TransactionDB or OptimisticTransactionDB.
Implementations§
Source§impl<DB> Transaction<'_, DB>
impl<DB> Transaction<'_, DB>
Sourcepub fn commit(self) -> Result<(), Error>
pub fn commit(self) -> Result<(), Error>
Write all batched keys to the DB atomically.
May return any error that could be returned by DB::write.
If this transaction was created by a TransactionDB, an error of
the Expired kind may be returned if this transaction has
lived longer than expiration time in TransactionOptions.
If this transaction was created by an OptimisticTransactionDB, an error of
the Busy kind may be returned if the transaction
could not guarantee that there are no write conflicts.
An error of the TryAgain kind may be returned if the memtable
history size is not large enough (see Options::set_max_write_buffer_size_to_maintain).
pub fn set_name(&self, name: &[u8]) -> Result<(), Error>
pub fn get_name(&self) -> Option<Vec<u8>>
pub fn prepare(&self) -> Result<(), Error>
Sourcepub fn snapshot(&self) -> SnapshotWithThreadMode<'_, Transaction<'_, DB>>
pub fn snapshot(&self) -> SnapshotWithThreadMode<'_, Transaction<'_, DB>>
Returns snapshot associated with transaction if snapshot was enabled in TransactionOptions.
Otherwise, returns a snapshot with nullptr inside which doesn’t affect read operations.
Sourcepub fn set_savepoint(&self)
pub fn set_savepoint(&self)
Record the state of the transaction for future calls to rollback_to_savepoint.
May be called multiple times to set multiple save points.
Sourcepub fn rollback_to_savepoint(&self) -> Result<(), Error>
pub fn rollback_to_savepoint(&self) -> Result<(), Error>
Undo all operations in this transaction since the most recent call to set_savepoint
and removes the most recent set_savepoint.
Returns error if there is no previous call to set_savepoint.
Sourcepub fn get<K>(&self, key: K) -> Result<Option<Vec<u8>>, Error>
pub fn get<K>(&self, key: K) -> Result<Option<Vec<u8>>, Error>
Get the bytes associated with a key value.
See get_cf_opt for details.
pub fn get_pinned<K>( &self, key: K, ) -> Result<Option<DBPinnableSlice<'_>>, Error>
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>
Get the bytes associated with a key value and the given column family.
See get_cf_opt for details.
pub fn get_pinned_cf<K>( &self, cf: &impl AsColumnFamilyRef, key: K, ) -> Result<Option<DBPinnableSlice<'_>>, Error>
Sourcepub fn get_for_update<K>(
&self,
key: K,
exclusive: bool,
) -> Result<Option<Vec<u8>>, Error>
pub fn get_for_update<K>( &self, key: K, exclusive: bool, ) -> Result<Option<Vec<u8>>, Error>
Get the key and ensure that this transaction will only be able to be committed if this key is not written outside this transaction after it has first been read (or after the snapshot if a snapshot is set in this transaction).
See get_for_update_cf_opt for details.
pub fn get_pinned_for_update<K>( &self, key: K, exclusive: bool, ) -> Result<Option<DBPinnableSlice<'_>>, Error>
Sourcepub fn get_for_update_cf<K>(
&self,
cf: &impl AsColumnFamilyRef,
key: K,
exclusive: bool,
) -> Result<Option<Vec<u8>>, Error>
pub fn get_for_update_cf<K>( &self, cf: &impl AsColumnFamilyRef, key: K, exclusive: bool, ) -> Result<Option<Vec<u8>>, Error>
Get the key in the given column family and ensure that this transaction will only be able to be committed if this key is not written outside this transaction after it has first been read (or after the snapshot if a snapshot is set in this transaction).
See get_for_update_cf_opt for details.
pub fn get_pinned_for_update_cf<K>( &self, cf: &impl AsColumnFamilyRef, key: K, exclusive: bool, ) -> Result<Option<DBPinnableSlice<'_>>, Error>
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.
See get_cf_opt for details.
pub fn get_pinned_opt<K>( &self, key: K, readopts: &ReadOptions, ) -> Result<Option<DBPinnableSlice<'_>>, Error>
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>
Get the bytes associated with a key value and the given column family with read options.
This function will also read pending changes in this transaction.
Currently, this function will return an error of the MergeInProgress kind
if the most recent write to the queried key in this batch is a Merge.
pub fn get_pinned_cf_opt<K>( &self, cf: &impl AsColumnFamilyRef, key: K, readopts: &ReadOptions, ) -> Result<Option<DBPinnableSlice<'_>>, Error>
Sourcepub fn get_for_update_opt<K>(
&self,
key: K,
exclusive: bool,
opts: &ReadOptions,
) -> Result<Option<Vec<u8>>, Error>
pub fn get_for_update_opt<K>( &self, key: K, exclusive: bool, opts: &ReadOptions, ) -> Result<Option<Vec<u8>>, Error>
Get the key with read options and ensure that this transaction will only be able to be committed if this key is not written outside this transaction after it has first been read (or after the snapshot if a snapshot is set in this transaction).
See get_for_update_cf_opt for details.
pub fn get_pinned_for_update_opt<K>( &self, key: K, exclusive: bool, opts: &ReadOptions, ) -> Result<Option<DBPinnableSlice<'_>>, Error>
Sourcepub fn get_for_update_cf_opt<K>(
&self,
cf: &impl AsColumnFamilyRef,
key: K,
exclusive: bool,
opts: &ReadOptions,
) -> Result<Option<Vec<u8>>, Error>
pub fn get_for_update_cf_opt<K>( &self, cf: &impl AsColumnFamilyRef, key: K, exclusive: bool, opts: &ReadOptions, ) -> Result<Option<Vec<u8>>, Error>
Get the key in the given column family with read options and ensure that this transaction will only be able to be committed if this key is not written outside this transaction after it has first been read (or after the snapshot if a snapshot is set in this transaction).
Currently, this function will return an error of the MergeInProgress
if the most recent write to the queried key in this batch is a Merge.
If this transaction was created by a TransactionDB, it can return error of kind:
Busyif there is a write conflict.TimedOutif a lock could not be acquired.TryAgainif the memtable history size is not large enough.MergeInProgressif merge operations cannot be resolved.- or other errors if this key could not be read.
If this transaction was created by an [OptimisticTransactionDB], get_for_update_opt
can cause commit to fail. Otherwise, it could return any error that could
be returned by [DB::get].
pub fn get_pinned_for_update_cf_opt<K>( &self, cf: &impl AsColumnFamilyRef, key: K, exclusive: bool, opts: &ReadOptions, ) -> Result<Option<DBPinnableSlice<'_>>, Error>
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.
Sourcepub fn put<K, V>(&self, key: K, value: V) -> Result<(), Error>
pub fn put<K, V>(&self, key: K, value: V) -> Result<(), Error>
Put the key value in default column family and do conflict checking on the key.
See put_cf for details.
Sourcepub fn put_cf<K, V>(
&self,
cf: &impl AsColumnFamilyRef,
key: K,
value: V,
) -> Result<(), Error>
pub fn put_cf<K, V>( &self, cf: &impl AsColumnFamilyRef, key: K, value: V, ) -> Result<(), Error>
Put the key value in the given column family and do conflict checking on the key.
If this transaction was created by a TransactionDB, it can return error of kind:
Busyif there is a write conflict.TimedOutif a lock could not be acquired.TryAgainif the memtable history size is not large enough.MergeInProgressif merge operations cannot be resolved.- or other errors on unexpected failures.
Sourcepub fn merge<K, V>(&self, key: K, value: V) -> Result<(), Error>
pub fn merge<K, V>(&self, key: K, value: V) -> Result<(), Error>
Merge value with existing value of key, and also do conflict checking on the key.
See merge_cf for details.
Sourcepub fn merge_cf<K, V>(
&self,
cf: &impl AsColumnFamilyRef,
key: K,
value: V,
) -> Result<(), Error>
pub fn merge_cf<K, V>( &self, cf: &impl AsColumnFamilyRef, key: K, value: V, ) -> Result<(), Error>
Merge value with existing value of key in the given column family,
and also do conflict checking on the key.
If this transaction was created by a TransactionDB, it can return error of kind:
Busyif there is a write conflict.TimedOutif a lock could not be acquired.TryAgainif the memtable history size is not large enough.MergeInProgressif merge operations cannot be resolved.- or other errors on unexpected failures.
Sourcepub fn delete<K>(&self, key: K) -> Result<(), Error>
pub fn delete<K>(&self, key: K) -> Result<(), Error>
Delete the key value if it exists and do conflict checking on the key.
See delete_cf for details.
Sourcepub fn delete_cf<K>(
&self,
cf: &impl AsColumnFamilyRef,
key: K,
) -> Result<(), Error>
pub fn delete_cf<K>( &self, cf: &impl AsColumnFamilyRef, key: K, ) -> Result<(), Error>
Delete the key value in the given column family and do conflict checking.
If this transaction was created by a TransactionDB, it can return error of kind:
Busyif there is a write conflict.TimedOutif a lock could not be acquired.TryAgainif the memtable history size is not large enough.MergeInProgressif merge operations cannot be resolved.- or other errors on unexpected failures.
pub fn iterator<'a, 'b>(
&'a self,
mode: IteratorMode<'_>,
) -> DBIteratorWithThreadMode<'b, Transaction<'_, DB>>where
'a: 'b,
pub fn iterator_opt<'a, 'b>(
&'a self,
mode: IteratorMode<'_>,
readopts: ReadOptions,
) -> DBIteratorWithThreadMode<'b, Transaction<'_, DB>>where
'a: 'b,
Sourcepub fn iterator_cf_opt<'a, 'b>(
&'a self,
cf_handle: &impl AsColumnFamilyRef,
readopts: ReadOptions,
mode: IteratorMode<'_>,
) -> DBIteratorWithThreadMode<'b, Transaction<'_, DB>>where
'a: 'b,
pub fn iterator_cf_opt<'a, 'b>(
&'a self,
cf_handle: &impl AsColumnFamilyRef,
readopts: ReadOptions,
mode: IteratorMode<'_>,
) -> DBIteratorWithThreadMode<'b, Transaction<'_, DB>>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, Transaction<'_, DB>>where
'a: 'b,
pub fn full_iterator<'a, 'b>(
&'a self,
mode: IteratorMode<'_>,
) -> DBIteratorWithThreadMode<'b, Transaction<'_, DB>>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, Transaction<'_, DB>>
pub fn iterator_cf<'a, 'b>(
&'a self,
cf_handle: &impl AsColumnFamilyRef,
mode: IteratorMode<'_>,
) -> DBIteratorWithThreadMode<'b, Transaction<'_, DB>>where
'a: 'b,
pub fn full_iterator_cf<'a, 'b>(
&'a self,
cf_handle: &impl AsColumnFamilyRef,
mode: IteratorMode<'_>,
) -> DBIteratorWithThreadMode<'b, Transaction<'_, DB>>where
'a: 'b,
pub fn prefix_iterator_cf<'a, P>( &'a self, cf_handle: &impl AsColumnFamilyRef, prefix: P, ) -> DBIteratorWithThreadMode<'a, Transaction<'_, DB>>
Sourcepub fn raw_iterator<'a, 'b>(
&'a self,
) -> DBRawIteratorWithThreadMode<'b, Transaction<'_, DB>>where
'a: 'b,
pub fn raw_iterator<'a, 'b>(
&'a self,
) -> DBRawIteratorWithThreadMode<'b, Transaction<'_, DB>>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, Transaction<'_, DB>>where
'a: 'b,
pub fn raw_iterator_cf<'a, 'b>(
&'a self,
cf_handle: &impl AsColumnFamilyRef,
) -> DBRawIteratorWithThreadMode<'b, Transaction<'_, DB>>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, Transaction<'_, DB>>where
'a: 'b,
pub fn raw_iterator_opt<'a, 'b>(
&'a self,
readopts: ReadOptions,
) -> DBRawIteratorWithThreadMode<'b, Transaction<'_, DB>>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, Transaction<'_, DB>>where
'a: 'b,
pub fn raw_iterator_cf_opt<'a, 'b>(
&'a self,
cf_handle: &impl AsColumnFamilyRef,
readopts: ReadOptions,
) -> DBRawIteratorWithThreadMode<'b, Transaction<'_, DB>>where
'a: 'b,
Opens a raw iterator over the given column family, using the given read options
pub fn get_writebatch(&self) -> WriteBatchWithTransaction<true>
pub fn rebuild_from_writebatch( &self, writebatch: &WriteBatchWithTransaction<true>, ) -> Result<(), Error>
Trait Implementations§
Source§impl<DB> DBAccess for Transaction<'_, DB>
impl<DB> DBAccess for Transaction<'_, DB>
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<DB> Drop for Transaction<'_, DB>
impl<DB> Drop for Transaction<'_, DB>
impl<DB> Send for Transaction<'_, DB>
Auto Trait Implementations§
impl<'db, DB> Freeze for Transaction<'db, DB>
impl<'db, DB> RefUnwindSafe for Transaction<'db, DB>where
DB: RefUnwindSafe,
impl<'db, DB> !Sync for Transaction<'db, DB>
impl<'db, DB> Unpin for Transaction<'db, DB>
impl<'db, DB> UnwindSafe for Transaction<'db, DB>where
DB: RefUnwindSafe,
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.