pub struct IoCtx {
pub ioctx: rados_ioctx_t,
}
Expand description
Owns a ioctx handle
Fields§
§ioctx: rados_ioctx_t
Implementations§
Source§impl IoCtx
impl IoCtx
pub fn inner(&self) -> &rados_ioctx_t
Sourcepub fn destroy_rados_ioctx(&mut self)
pub fn destroy_rados_ioctx(&mut self)
This just tells librados that you no longer need to use the io context. It may not be freed immediately if there are pending asynchronous requests on it, but you should not use an io context again after calling this function on it. This does not guarantee any asynchronous writes have completed. You must call rados_aio_flush() on the io context before destroying it to do that.
Sourcepub fn rados_stat_pool(&self) -> RadosResult<Struct_rados_pool_stat_t>
pub fn rados_stat_pool(&self) -> RadosResult<Struct_rados_pool_stat_t>
Note: Ceph uses kibibytes: https://en.wikipedia.org/wiki/Kibibyte
pub fn rados_pool_set_auid(&self, auid: u64) -> RadosResult<()>
pub fn rados_pool_get_auid(&self) -> RadosResult<u64>
Sourcepub fn rados_pool_requires_alignment(&self) -> RadosResult<bool>
pub fn rados_pool_requires_alignment(&self) -> RadosResult<bool>
Test whether the specified pool requires alignment or not.
Sourcepub fn rados_pool_required_alignment(&self) -> RadosResult<u64>
pub fn rados_pool_required_alignment(&self) -> RadosResult<u64>
Get the alignment flavor of a pool
Sourcepub fn rados_object_get_id(&self) -> RadosResult<i64>
pub fn rados_object_get_id(&self) -> RadosResult<i64>
Get the pool id of the io context
Sourcepub fn rados_get_pool_name(&self) -> RadosResult<String>
pub fn rados_get_pool_name(&self) -> RadosResult<String>
Get the pool name of the io context
Sourcepub fn rados_locator_set_key(&self, key: &str) -> RadosResult<()>
pub fn rados_locator_set_key(&self, key: &str) -> RadosResult<()>
Set the key for mapping objects to pgs within an io context.
Sourcepub fn rados_set_namespace(&self, namespace: &str) -> RadosResult<()>
pub fn rados_set_namespace(&self, namespace: &str) -> RadosResult<()>
Set the namespace for objects within an io context The namespace specification further refines a pool into different domains. The mapping of objects to pgs is also based on this value.
Sourcepub fn rados_list_pool_objects(&self) -> RadosResult<rados_list_ctx_t>
pub fn rados_list_pool_objects(&self) -> RadosResult<rados_list_ctx_t>
Start listing objects in a pool
Sourcepub fn rados_snap_create(&self, snap_name: &str) -> RadosResult<()>
pub fn rados_snap_create(&self, snap_name: &str) -> RadosResult<()>
Create a pool-wide snapshot
Sourcepub fn rados_snap_remove(&self, snap_name: &str) -> RadosResult<()>
pub fn rados_snap_remove(&self, snap_name: &str) -> RadosResult<()>
Delete a pool snapshot
Sourcepub fn rados_snap_rollback(
&self,
object_name: &str,
snap_name: &str,
) -> RadosResult<()>
pub fn rados_snap_rollback( &self, object_name: &str, snap_name: &str, ) -> RadosResult<()>
Rollback an object to a pool snapshot The contents of the object will be the same as when the snapshot was taken.
Sourcepub fn rados_snap_set_read(&self, snap_id: u64) -> RadosResult<()>
pub fn rados_snap_set_read(&self, snap_id: u64) -> RadosResult<()>
Set the snapshot from which reads are performed. Subsequent reads will return data as it was at the time of that snapshot.
Sourcepub fn rados_selfmanaged_snap_create(&self) -> RadosResult<u64>
pub fn rados_selfmanaged_snap_create(&self) -> RadosResult<u64>
Allocate an ID for a self-managed snapshot Get a unique ID to put in the snaphot context to create a snapshot. A clone of an object is not created until a write with the new snapshot context is completed.
Sourcepub fn rados_selfmanaged_snap_remove(&self, snap_id: u64) -> RadosResult<()>
pub fn rados_selfmanaged_snap_remove(&self, snap_id: u64) -> RadosResult<()>
Remove a self-managed snapshot This increases the snapshot sequence number, which will cause snapshots to be removed lazily.
Sourcepub fn rados_selfmanaged_snap_rollback(
&self,
object_name: &str,
snap_id: u64,
) -> RadosResult<()>
pub fn rados_selfmanaged_snap_rollback( &self, object_name: &str, snap_id: u64, ) -> RadosResult<()>
Rollback an object to a self-managed snapshot The contents of the object will be the same as when the snapshot was taken.
Sourcepub fn rados_snap_lookup(&self, snap_name: &str) -> RadosResult<u64>
pub fn rados_snap_lookup(&self, snap_name: &str) -> RadosResult<u64>
Set the snapshot context for use when writing to objects This is stored in the io context, and applies to all future writes. List all the ids of pool snapshots Get the id of a pool snapshot
Sourcepub fn rados_snap_get_name(&self, snap_id: u64) -> RadosResult<String>
pub fn rados_snap_get_name(&self, snap_id: u64) -> RadosResult<String>
Get the name of a pool snapshot
Sourcepub fn rados_snap_get_stamp(&self, snap_id: u64) -> RadosResult<time_t>
pub fn rados_snap_get_stamp(&self, snap_id: u64) -> RadosResult<time_t>
Find when a pool snapshot occurred
Sourcepub fn rados_get_object_last_version(&self) -> RadosResult<u64>
pub fn rados_get_object_last_version(&self) -> RadosResult<u64>
Return the version of the last object read or written to. This exposes the internal version number of the last object read or written via this io context
Sourcepub fn rados_object_write(
&self,
object_name: &str,
buffer: &[u8],
offset: u64,
) -> RadosResult<()>
pub fn rados_object_write( &self, object_name: &str, buffer: &[u8], offset: u64, ) -> RadosResult<()>
Write len bytes from buf into the oid object, starting at offset off. The value of len must be <= UINT_MAX/2.
Sourcepub fn rados_object_write_full(
&self,
object_name: &str,
buffer: &[u8],
) -> RadosResult<()>
pub fn rados_object_write_full( &self, object_name: &str, buffer: &[u8], ) -> RadosResult<()>
The object is filled with the provided data. If the object exists, it is atomically truncated and then written.
pub async fn rados_async_object_write( &self, object_name: &str, buffer: &[u8], offset: u64, ) -> RadosResult<u32>
Sourcepub async fn rados_async_object_append(
self: &Arc<Self>,
object_name: &str,
buffer: &[u8],
) -> RadosResult<u32>
pub async fn rados_async_object_append( self: &Arc<Self>, object_name: &str, buffer: &[u8], ) -> RadosResult<u32>
Async variant of rados_object_append
Sourcepub async fn rados_async_object_write_full(
&self,
object_name: &str,
buffer: &[u8],
) -> RadosResult<u32>
pub async fn rados_async_object_write_full( &self, object_name: &str, buffer: &[u8], ) -> RadosResult<u32>
Async variant of rados_object_write_full
Sourcepub async fn rados_async_object_remove(
&self,
object_name: &str,
) -> RadosResult<()>
pub async fn rados_async_object_remove( &self, object_name: &str, ) -> RadosResult<()>
Async variant of rados_object_remove
Sourcepub async fn rados_async_object_read(
&self,
object_name: &str,
fill_buffer: &mut Vec<u8>,
read_offset: u64,
) -> RadosResult<u32>
pub async fn rados_async_object_read( &self, object_name: &str, fill_buffer: &mut Vec<u8>, read_offset: u64, ) -> RadosResult<u32>
Async variant of rados_object_read
Sourcepub fn rados_async_object_read_stream(
&self,
object_name: &str,
buffer_size: Option<usize>,
concurrency: Option<usize>,
size_hint: Option<u64>,
) -> ReadStream<'_>
pub fn rados_async_object_read_stream( &self, object_name: &str, buffer_size: Option<usize>, concurrency: Option<usize>, size_hint: Option<u64>, ) -> ReadStream<'_>
Streaming read of a RADOS object. The ReadStream
object implements futures::Stream
for use with Stream-aware code like hyper’s Body::wrap_stream.
Useful for reading large objects incrementally, or anywhere you are using an interface that expects a stream (such as proxying objects via an HTTP server).
Efficiency: If size_hint is not specified, and this function is used on a small object, it will
issue spurious read-ahead operations beyond the object’s size.
If you have an object that you know is small, prefer to use a single rados_async_object_read
instead of this streaming variant.
buffer_size
- How much data should be read per rados read operation. This is also how much data is emitted in each Item from the stream.concurrency
- How many RADOS operations should be run in parallel for this stream, or None to use a default.size_hint
- If you have prior knowledge of the object’s size in bytes, pass it here to enable the stream to issue fewer read-ahead operations than it would by default. This is just a hint, and does not bound the data returned – if the object is smaller or larger thansize_hint
then the actual object size will be reflected in the stream’s output.
Sourcepub fn rados_async_object_write_stream(
&self,
object_name: &str,
concurrency: Option<usize>,
) -> WriteSink<'_>
pub fn rados_async_object_write_stream( &self, object_name: &str, concurrency: Option<usize>, ) -> WriteSink<'_>
Streaming write of a RADOS object. The WriteSink
object implements futures::Sink
. Combine
it with other stream-aware code, or bring the SinkExt trait into scope to get methods
like send, send_all.
Efficiency: this class does not coalesce writes, so each Item you send into it,
concurrency
- How many RADOS operations should be run in parallel for this stream, or None to use a default.
Sourcepub async fn rados_async_object_stat(
&self,
object_name: &str,
) -> RadosResult<(u64, SystemTime)>
pub async fn rados_async_object_stat( &self, object_name: &str, ) -> RadosResult<(u64, SystemTime)>
Get object stats (size,SystemTime)
pub fn rados_async_object_list(&self) -> RadosResult<ListStream>
Sourcepub async fn rados_async_object_getxattr(
&self,
object_name: &str,
attr_name: &str,
fill_buffer: &mut [u8],
) -> RadosResult<u32>
pub async fn rados_async_object_getxattr( &self, object_name: &str, attr_name: &str, fill_buffer: &mut [u8], ) -> RadosResult<u32>
Async variant of rados_object_getxattr
Sourcepub async fn rados_async_object_setxattr(
&self,
object_name: &str,
attr_name: &str,
attr_value: &[u8],
) -> RadosResult<u32>
pub async fn rados_async_object_setxattr( &self, object_name: &str, attr_name: &str, attr_value: &[u8], ) -> RadosResult<u32>
Async variant of rados_object_setxattr
Sourcepub async fn rados_async_object_rmxattr(
&self,
object_name: &str,
attr_name: &str,
) -> RadosResult<u32>
pub async fn rados_async_object_rmxattr( &self, object_name: &str, attr_name: &str, ) -> RadosResult<u32>
Async variant of rados_object_rmxattr
Sourcepub fn rados_object_clone_range(
&self,
dst_object_name: &str,
dst_offset: u64,
src_object_name: &str,
src_offset: u64,
length: usize,
) -> RadosResult<()>
pub fn rados_object_clone_range( &self, dst_object_name: &str, dst_offset: u64, src_object_name: &str, src_offset: u64, length: usize, ) -> RadosResult<()>
Efficiently copy a portion of one object to another If the underlying filesystem on the OSD supports it, this will be a copy-on-write clone. The src and dest objects must be in the same pg. To ensure this, the io context should have a locator key set (see rados_ioctx_locator_set_key()).
Sourcepub fn rados_object_append(
&self,
object_name: &str,
buffer: &[u8],
) -> RadosResult<()>
pub fn rados_object_append( &self, object_name: &str, buffer: &[u8], ) -> RadosResult<()>
Append len bytes from buf into the oid object.
Sourcepub fn rados_object_read(
&self,
object_name: &str,
fill_buffer: &mut Vec<u8>,
read_offset: u64,
) -> RadosResult<i32>
pub fn rados_object_read( &self, object_name: &str, fill_buffer: &mut Vec<u8>, read_offset: u64, ) -> RadosResult<i32>
Read data from an object. This fills the slice given and returns the amount of bytes read The io context determines the snapshot to read from, if any was set by rados_ioctx_snap_set_read(). Default read size is 64K unless you call Vec::with_capacity with a larger size.
Sourcepub fn rados_object_remove(&self, object_name: &str) -> RadosResult<()>
pub fn rados_object_remove(&self, object_name: &str) -> RadosResult<()>
Delete an object Note: This does not delete any snapshots of the object.
Sourcepub fn rados_object_trunc(
&self,
object_name: &str,
new_size: u64,
) -> RadosResult<()>
pub fn rados_object_trunc( &self, object_name: &str, new_size: u64, ) -> RadosResult<()>
Resize an object If this enlarges the object, the new area is logically filled with zeroes. If this shrinks the object, the excess data is removed.
Sourcepub fn rados_object_getxattr(
&self,
object_name: &str,
attr_name: &str,
fill_buffer: &mut [u8],
) -> RadosResult<i32>
pub fn rados_object_getxattr( &self, object_name: &str, attr_name: &str, fill_buffer: &mut [u8], ) -> RadosResult<i32>
Get the value of an extended attribute on an object.
Sourcepub fn rados_object_setxattr(
&self,
object_name: &str,
attr_name: &str,
attr_value: &mut [u8],
) -> RadosResult<()>
pub fn rados_object_setxattr( &self, object_name: &str, attr_name: &str, attr_value: &mut [u8], ) -> RadosResult<()>
Set an extended attribute on an object.
Sourcepub fn rados_object_rmxattr(
&self,
object_name: &str,
attr_name: &str,
) -> RadosResult<()>
pub fn rados_object_rmxattr( &self, object_name: &str, attr_name: &str, ) -> RadosResult<()>
Delete an extended attribute from an object.
Sourcepub fn rados_get_xattr_iterator(
&self,
object_name: &str,
) -> RadosResult<rados_xattrs_iter_t>
pub fn rados_get_xattr_iterator( &self, object_name: &str, ) -> RadosResult<rados_xattrs_iter_t>
Get the rados_xattrs_iter_t reference to iterate over xattrs on an object Used in conjuction with XAttr::new() to iterate.
Sourcepub fn rados_object_stat(
&self,
object_name: &str,
) -> RadosResult<(u64, SystemTime)>
pub fn rados_object_stat( &self, object_name: &str, ) -> RadosResult<(u64, SystemTime)>
Get object stats (size,SystemTime)
Sourcepub fn rados_object_tmap_update(
&self,
object_name: &str,
update: TmapOperation,
) -> RadosResult<()>
pub fn rados_object_tmap_update( &self, object_name: &str, update: TmapOperation, ) -> RadosResult<()>
Update tmap (trivial map)
Sourcepub fn rados_object_tmap_get(
&self,
object_name: &str,
) -> RadosResult<Vec<TmapOperation>>
pub fn rados_object_tmap_get( &self, object_name: &str, ) -> RadosResult<Vec<TmapOperation>>
Fetch complete tmap (trivial map) object
Sourcepub fn rados_object_exec(
&self,
object_name: &str,
class_name: &str,
method_name: &str,
input_buffer: &[u8],
output_buffer: &mut [u8],
) -> RadosResult<()>
pub fn rados_object_exec( &self, object_name: &str, class_name: &str, method_name: &str, input_buffer: &[u8], output_buffer: &mut [u8], ) -> RadosResult<()>
Execute an OSD class method on an object The OSD has a plugin mechanism for performing complicated operations on an object atomically. These plugins are called classes. This function allows librados users to call the custom methods. The input and output formats are defined by the class. Classes in ceph.git can be found in src/cls subdirectories
Sourcepub fn rados_object_notify(
&self,
object_name: &str,
data: &[u8],
) -> RadosResult<()>
pub fn rados_object_notify( &self, object_name: &str, data: &[u8], ) -> RadosResult<()>
Sychronously notify watchers of an object This blocks until all watchers of the object have received and reacted to the notify, or a timeout is reached.
Sourcepub fn rados_object_notify_ack(
&self,
object_name: &str,
notify_id: u64,
cookie: u64,
buffer: Option<&[u8]>,
) -> RadosResult<()>
pub fn rados_object_notify_ack( &self, object_name: &str, notify_id: u64, cookie: u64, buffer: Option<&[u8]>, ) -> RadosResult<()>
Acknolwedge receipt of a notify
Sourcepub fn rados_object_set_alloc_hint(
&self,
object_name: &str,
expected_object_size: u64,
expected_write_size: u64,
) -> RadosResult<()>
pub fn rados_object_set_alloc_hint( &self, object_name: &str, expected_object_size: u64, expected_write_size: u64, ) -> RadosResult<()>
Set allocation hint for an object This is an advisory operation, it will always succeed (as if it was submitted with a LIBRADOS_OP_FLAG_FAILOK flag set) and is not guaranteed to do anything on the backend.
pub fn rados_perform_read_operations( &self, read_op: ReadOperation, ) -> RadosResult<()>
pub fn rados_commit_write_operations( &self, write_op: &mut WriteOperation, ) -> RadosResult<()>
Sourcepub fn rados_object_lock_exclusive(
&self,
object_name: &str,
lock_name: &str,
cookie_name: &str,
description: &str,
duration_time: &mut timeval,
lock_flags: u8,
) -> RadosResult<()>
pub fn rados_object_lock_exclusive( &self, object_name: &str, lock_name: &str, cookie_name: &str, description: &str, duration_time: &mut timeval, lock_flags: u8, ) -> RadosResult<()>
Take an exclusive lock on an object.
Take a shared lock on an object.
Sourcepub fn rados_object_unlock(
&self,
object_name: &str,
lock_name: &str,
cookie_name: &str,
) -> RadosResult<()>
pub fn rados_object_unlock( &self, object_name: &str, lock_name: &str, cookie_name: &str, ) -> RadosResult<()>
Release a shared or exclusive lock on an object.
Sourcepub fn rados_object_break_lock(
&self,
object_name: &str,
lock_name: &str,
client_name: &str,
cookie_name: &str,
) -> RadosResult<()>
pub fn rados_object_break_lock( &self, object_name: &str, lock_name: &str, client_name: &str, cookie_name: &str, ) -> RadosResult<()>
List clients that have locked the named object lock and information about the lock. The number of bytes required in each buffer is put in the corresponding size out parameter. If any of the provided buffers are too short, -ERANGE is returned after these sizes are filled in. Releases a shared or exclusive lock on an object, which was taken by the specified client.
Trait Implementations§
Auto Trait Implementations§
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> PipeAsRef for T
impl<T> PipeAsRef for T
Source§impl<T> PipeBorrow for T
impl<T> PipeBorrow for T
Source§impl<T> PipeDeref for T
impl<T> PipeDeref for T
Source§impl<T> PipeRef for T
impl<T> PipeRef for T
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.Source§impl<T> Tap for T
impl<T> Tap for T
Source§fn tap<F, R>(self, func: F) -> Selfwhere
F: FnOnce(&Self) -> R,
fn tap<F, R>(self, func: F) -> Selfwhere
F: FnOnce(&Self) -> R,
Source§fn tap_dbg<F, R>(self, func: F) -> Selfwhere
F: FnOnce(&Self) -> R,
fn tap_dbg<F, R>(self, func: F) -> Selfwhere
F: FnOnce(&Self) -> R,
tap
in debug builds, and does nothing in release builds.Source§fn tap_mut<F, R>(self, func: F) -> Selfwhere
F: FnOnce(&mut Self) -> R,
fn tap_mut<F, R>(self, func: F) -> Selfwhere
F: FnOnce(&mut Self) -> R,
Source§fn tap_mut_dbg<F, R>(self, func: F) -> Selfwhere
F: FnOnce(&mut Self) -> R,
fn tap_mut_dbg<F, R>(self, func: F) -> Selfwhere
F: FnOnce(&mut Self) -> R,
tap_mut
in debug builds, and does nothing in release builds.Source§impl<T, U> TapAsRef<U> for Twhere
U: ?Sized,
impl<T, U> TapAsRef<U> for Twhere
U: ?Sized,
Source§fn tap_ref<F, R>(self, func: F) -> Self
fn tap_ref<F, R>(self, func: F) -> Self
Source§fn tap_ref_dbg<F, R>(self, func: F) -> Self
fn tap_ref_dbg<F, R>(self, func: F) -> Self
tap_ref
in debug builds, and does nothing in release builds.Source§fn tap_ref_mut<F, R>(self, func: F) -> Self
fn tap_ref_mut<F, R>(self, func: F) -> Self
Source§impl<T, U> TapBorrow<U> for Twhere
U: ?Sized,
impl<T, U> TapBorrow<U> for Twhere
U: ?Sized,
Source§fn tap_borrow<F, R>(self, func: F) -> Self
fn tap_borrow<F, R>(self, func: F) -> Self
Source§fn tap_borrow_dbg<F, R>(self, func: F) -> Self
fn tap_borrow_dbg<F, R>(self, func: F) -> Self
tap_borrow
in debug builds, and does nothing in release builds.Source§fn tap_borrow_mut<F, R>(self, func: F) -> Self
fn tap_borrow_mut<F, R>(self, func: F) -> Self
Source§impl<T> TapDeref for T
impl<T> TapDeref for T
Source§fn tap_deref_dbg<F, R>(self, func: F) -> Self
fn tap_deref_dbg<F, R>(self, func: F) -> Self
tap_deref
in debug builds, and does nothing in release builds.Source§fn tap_deref_mut<F, R>(self, func: F) -> Self
fn tap_deref_mut<F, R>(self, func: F) -> Self
self
for modification.