Struct IoCtx

Source
pub struct IoCtx {
    pub ioctx: rados_ioctx_t,
}
Expand description

Owns a ioctx handle

Fields§

§ioctx: rados_ioctx_t

Implementations§

Source§

impl IoCtx

Source

pub fn inner(&self) -> &rados_ioctx_t

Source

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.

Source

pub fn rados_stat_pool(&self) -> RadosResult<Struct_rados_pool_stat_t>

Note: Ceph uses kibibytes: https://en.wikipedia.org/wiki/Kibibyte

Source

pub fn rados_pool_set_auid(&self, auid: u64) -> RadosResult<()>

Source

pub fn rados_pool_get_auid(&self) -> RadosResult<u64>

Source

pub fn rados_pool_requires_alignment(&self) -> RadosResult<bool>

Test whether the specified pool requires alignment or not.

Source

pub fn rados_pool_required_alignment(&self) -> RadosResult<u64>

Get the alignment flavor of a pool

Source

pub fn rados_object_get_id(&self) -> RadosResult<i64>

Get the pool id of the io context

Source

pub fn rados_get_pool_name(&self) -> RadosResult<String>

Get the pool name of the io context

Source

pub fn rados_locator_set_key(&self, key: &str) -> RadosResult<()>

Set the key for mapping objects to pgs within an io context.

Source

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.

Source

pub fn rados_list_pool_objects(&self) -> RadosResult<rados_list_ctx_t>

Start listing objects in a pool

Source

pub fn rados_snap_create(&self, snap_name: &str) -> RadosResult<()>

Create a pool-wide snapshot

Source

pub fn rados_snap_remove(&self, snap_name: &str) -> RadosResult<()>

Delete a pool snapshot

Source

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.

Source

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.

Source

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.

Source

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.

Source

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.

Source

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

Source

pub fn rados_snap_get_name(&self, snap_id: u64) -> RadosResult<String>

Get the name of a pool snapshot

Source

pub fn rados_snap_get_stamp(&self, snap_id: u64) -> RadosResult<time_t>

Find when a pool snapshot occurred

Source

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

Source

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.

Source

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.

Source

pub async fn rados_async_object_write( &self, object_name: &str, buffer: &[u8], offset: u64, ) -> RadosResult<u32>

Source

pub async fn rados_async_object_append( self: &Arc<Self>, object_name: &str, buffer: &[u8], ) -> RadosResult<u32>

Async variant of rados_object_append

Source

pub async fn rados_async_object_write_full( &self, object_name: &str, buffer: &[u8], ) -> RadosResult<u32>

Async variant of rados_object_write_full

Source

pub async fn rados_async_object_remove( &self, object_name: &str, ) -> RadosResult<()>

Async variant of rados_object_remove

Source

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

Source

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 than size_hint then the actual object size will be reflected in the stream’s output.
Source

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.
Source

pub async fn rados_async_object_stat( &self, object_name: &str, ) -> RadosResult<(u64, SystemTime)>

Get object stats (size,SystemTime)

Source

pub fn rados_async_object_list(&self) -> RadosResult<ListStream>

Source

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

Source

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

Source

pub async fn rados_async_object_rmxattr( &self, object_name: &str, attr_name: &str, ) -> RadosResult<u32>

Async variant of rados_object_rmxattr

Source

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()).

Source

pub fn rados_object_append( &self, object_name: &str, buffer: &[u8], ) -> RadosResult<()>

Append len bytes from buf into the oid object.

Source

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.

Source

pub fn rados_object_remove(&self, object_name: &str) -> RadosResult<()>

Delete an object Note: This does not delete any snapshots of the object.

Source

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.

Source

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.

Source

pub fn rados_object_setxattr( &self, object_name: &str, attr_name: &str, attr_value: &mut [u8], ) -> RadosResult<()>

Set an extended attribute on an object.

Source

pub fn rados_object_rmxattr( &self, object_name: &str, attr_name: &str, ) -> RadosResult<()>

Delete an extended attribute from an object.

Source

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.

Source

pub fn rados_object_stat( &self, object_name: &str, ) -> RadosResult<(u64, SystemTime)>

Get object stats (size,SystemTime)

Source

pub fn rados_object_tmap_update( &self, object_name: &str, update: TmapOperation, ) -> RadosResult<()>

Update tmap (trivial map)

Source

pub fn rados_object_tmap_get( &self, object_name: &str, ) -> RadosResult<Vec<TmapOperation>>

Fetch complete tmap (trivial map) object

Source

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

Source

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.

Source

pub fn rados_object_notify_ack( &self, object_name: &str, notify_id: u64, cookie: u64, buffer: Option<&[u8]>, ) -> RadosResult<()>

Acknolwedge receipt of a notify

Source

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.

Source

pub fn rados_perform_read_operations( &self, read_op: ReadOperation, ) -> RadosResult<()>

Source

pub fn rados_commit_write_operations( &self, write_op: &mut WriteOperation, ) -> RadosResult<()>

Source

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.

Source

pub fn rados_object_lock_shared( &self, object_name: &str, lock_name: &str, cookie_name: &str, description: &str, tag_name: &str, duration_time: &mut timeval, lock_flags: u8, ) -> RadosResult<()>

Take a shared lock on an object.

Source

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.

Source

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§

Source§

impl Drop for IoCtx

Source§

fn drop(&mut self)

Executes the destructor for this type. Read more
Source§

impl Send for IoCtx

Source§

impl Sync for IoCtx

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> Conv for T

Source§

fn conv<T>(self) -> T
where Self: Into<T>,

Converts self into T using Into<T>. Read more
Source§

impl<T> Conv for T

Source§

fn conv<T>(self) -> T
where Self: Into<T>,

Converts self into a target type. Read more
Source§

impl<T> FmtForward for T

Source§

fn fmt_binary(self) -> FmtBinary<Self>
where Self: Binary,

Causes self to use its Binary implementation when Debug-formatted.
Source§

fn fmt_display(self) -> FmtDisplay<Self>
where Self: Display,

Causes self to use its Display implementation when Debug-formatted.
Source§

fn fmt_lower_exp(self) -> FmtLowerExp<Self>
where Self: LowerExp,

Causes self to use its LowerExp implementation when Debug-formatted.
Source§

fn fmt_lower_hex(self) -> FmtLowerHex<Self>
where Self: LowerHex,

Causes self to use its LowerHex implementation when Debug-formatted.
Source§

fn fmt_octal(self) -> FmtOctal<Self>
where Self: Octal,

Causes self to use its Octal implementation when Debug-formatted.
Source§

fn fmt_pointer(self) -> FmtPointer<Self>
where Self: Pointer,

Causes self to use its Pointer implementation when Debug-formatted.
Source§

fn fmt_upper_exp(self) -> FmtUpperExp<Self>
where Self: UpperExp,

Causes self to use its UpperExp implementation when Debug-formatted.
Source§

fn fmt_upper_hex(self) -> FmtUpperHex<Self>
where Self: UpperHex,

Causes self to use its UpperHex implementation when Debug-formatted.
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Pipe for T
where T: ?Sized,

Source§

fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> R
where Self: Sized,

Pipes by value. This is generally the method you want to use. Read more
Source§

fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> R
where R: 'a,

Borrows self and passes that borrow into the pipe function. Read more
Source§

fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> R
where R: 'a,

Mutably borrows self and passes that borrow into the pipe function. Read more
Source§

fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
where Self: Borrow<B>, B: 'a + ?Sized, R: 'a,

Borrows self, then passes self.borrow() into the pipe function. Read more
Source§

fn pipe_borrow_mut<'a, B, R>( &'a mut self, func: impl FnOnce(&'a mut B) -> R, ) -> R
where Self: BorrowMut<B>, B: 'a + ?Sized, R: 'a,

Mutably borrows self, then passes self.borrow_mut() into the pipe function. Read more
Source§

fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
where Self: AsRef<U>, U: 'a + ?Sized, R: 'a,

Borrows 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
where Self: AsMut<U>, U: 'a + ?Sized, R: 'a,

Mutably borrows 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
where Self: Deref<Target = T>, T: 'a + ?Sized, R: 'a,

Borrows self, then passes self.deref() into the pipe function.
Source§

fn pipe_deref_mut<'a, T, R>( &'a mut self, func: impl FnOnce(&'a mut T) -> R, ) -> R
where Self: DerefMut<Target = T> + Deref, T: 'a + ?Sized, R: 'a,

Mutably borrows self, then passes self.deref_mut() into the pipe function.
Source§

impl<T> Pipe for T

Source§

fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> R

Pipes a value into a function that cannot ordinarily be called in suffix position. Read more
Source§

impl<T> PipeAsRef for T

Source§

fn pipe_as_ref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
where Self: AsRef<T>, T: 'a, R: 'a,

Pipes a trait borrow into a function that cannot normally be called in suffix position. Read more
Source§

fn pipe_as_mut<'a, T, R>(&'a mut self, func: impl FnOnce(&'a mut T) -> R) -> R
where Self: AsMut<T>, T: 'a, R: 'a,

Pipes a trait mutable borrow into a function that cannot normally be called in suffix position. Read more
Source§

impl<T> PipeBorrow for T

Source§

fn pipe_borrow<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
where Self: Borrow<T>, T: 'a, R: 'a,

Pipes a trait borrow into a function that cannot normally be called in suffix position. Read more
Source§

fn pipe_borrow_mut<'a, T, R>( &'a mut self, func: impl FnOnce(&'a mut T) -> R, ) -> R
where Self: BorrowMut<T>, T: 'a, R: 'a,

Pipes a trait mutable borrow into a function that cannot normally be called in suffix position. Read more
Source§

impl<T> PipeDeref for T

Source§

fn pipe_deref<'a, R>(&'a self, func: impl FnOnce(&'a Self::Target) -> R) -> R
where Self: Deref, R: 'a,

Pipes a dereference into a function that cannot normally be called in suffix position. Read more
Source§

fn pipe_deref_mut<'a, R>( &'a mut self, func: impl FnOnce(&'a mut Self::Target) -> R, ) -> R
where Self: DerefMut, R: 'a,

Pipes a mutable dereference into a function that cannot normally be called in suffix position. Read more
Source§

impl<T> PipeRef for T

Source§

fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> R
where R: 'a,

Pipes a reference into a function that cannot ordinarily be called in suffix position. Read more
Source§

fn pipe_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> R
where R: 'a,

Pipes a mutable reference into a function that cannot ordinarily be called in suffix position. Read more
Source§

impl<T> Tap for T

Source§

fn tap(self, func: impl FnOnce(&Self)) -> Self

Immutable access to a value. Read more
Source§

fn tap_mut(self, func: impl FnOnce(&mut Self)) -> Self

Mutable access to a value. Read more
Source§

fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
where Self: Borrow<B>, B: ?Sized,

Immutable access to the Borrow<B> of a value. Read more
Source§

fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
where Self: BorrowMut<B>, B: ?Sized,

Mutable access to the BorrowMut<B> of a value. Read more
Source§

fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
where Self: AsRef<R>, R: ?Sized,

Immutable access to the AsRef<R> view of a value. Read more
Source§

fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
where Self: AsMut<R>, R: ?Sized,

Mutable access to the AsMut<R> view of a value. Read more
Source§

fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
where Self: Deref<Target = T>, T: ?Sized,

Immutable access to the Deref::Target of a value. Read more
Source§

fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
where Self: DerefMut<Target = T> + Deref, T: ?Sized,

Mutable access to the Deref::Target of a value. Read more
Source§

fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self

Calls .tap() only in debug builds, and is erased in release builds.
Source§

fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self

Calls .tap_mut() only in debug builds, and is erased in release builds.
Source§

fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
where Self: Borrow<B>, B: ?Sized,

Calls .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
where Self: BorrowMut<B>, B: ?Sized,

Calls .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
where Self: AsRef<R>, R: ?Sized,

Calls .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
where Self: AsMut<R>, R: ?Sized,

Calls .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
where Self: Deref<Target = T>, T: ?Sized,

Calls .tap_deref() only in debug builds, and is erased in release builds.
Source§

fn tap_deref_mut_dbg<T>(self, func: impl FnOnce(&mut T)) -> Self
where Self: DerefMut<Target = T> + Deref, T: ?Sized,

Calls .tap_deref_mut() only in debug builds, and is erased in release builds.
Source§

impl<T> Tap for T

Source§

fn tap<F, R>(self, func: F) -> Self
where F: FnOnce(&Self) -> R,

Provides immutable access for inspection. Read more
Source§

fn tap_dbg<F, R>(self, func: F) -> Self
where F: FnOnce(&Self) -> R,

Calls tap in debug builds, and does nothing in release builds.
Source§

fn tap_mut<F, R>(self, func: F) -> Self
where F: FnOnce(&mut Self) -> R,

Provides mutable access for modification. Read more
Source§

fn tap_mut_dbg<F, R>(self, func: F) -> Self
where F: FnOnce(&mut Self) -> R,

Calls tap_mut in debug builds, and does nothing in release builds.
Source§

impl<T, U> TapAsRef<U> for T
where U: ?Sized,

Source§

fn tap_ref<F, R>(self, func: F) -> Self
where Self: AsRef<T>, F: FnOnce(&T) -> R,

Provides immutable access to the reference for inspection.
Source§

fn tap_ref_dbg<F, R>(self, func: F) -> Self
where Self: AsRef<T>, F: FnOnce(&T) -> R,

Calls tap_ref in debug builds, and does nothing in release builds.
Source§

fn tap_ref_mut<F, R>(self, func: F) -> Self
where Self: AsMut<T>, F: FnOnce(&mut T) -> R,

Provides mutable access to the reference for modification.
Source§

fn tap_ref_mut_dbg<F, R>(self, func: F) -> Self
where Self: AsMut<T>, F: FnOnce(&mut T) -> R,

Calls tap_ref_mut in debug builds, and does nothing in release builds.
Source§

impl<T, U> TapBorrow<U> for T
where U: ?Sized,

Source§

fn tap_borrow<F, R>(self, func: F) -> Self
where Self: Borrow<T>, F: FnOnce(&T) -> R,

Provides immutable access to the borrow for inspection. Read more
Source§

fn tap_borrow_dbg<F, R>(self, func: F) -> Self
where Self: Borrow<T>, F: FnOnce(&T) -> R,

Calls tap_borrow in debug builds, and does nothing in release builds.
Source§

fn tap_borrow_mut<F, R>(self, func: F) -> Self
where Self: BorrowMut<T>, F: FnOnce(&mut T) -> R,

Provides mutable access to the borrow for modification.
Source§

fn tap_borrow_mut_dbg<F, R>(self, func: F) -> Self
where Self: BorrowMut<T>, F: FnOnce(&mut T) -> R,

Calls tap_borrow_mut in debug builds, and does nothing in release builds.
Source§

impl<T> TapDeref for T

Source§

fn tap_deref<F, R>(self, func: F) -> Self
where Self: Deref, F: FnOnce(&Self::Target) -> R,

Immutably dereferences self for inspection.
Source§

fn tap_deref_dbg<F, R>(self, func: F) -> Self
where Self: Deref, F: FnOnce(&Self::Target) -> R,

Calls tap_deref in debug builds, and does nothing in release builds.
Source§

fn tap_deref_mut<F, R>(self, func: F) -> Self
where Self: DerefMut, F: FnOnce(&mut Self::Target) -> R,

Mutably dereferences self for modification.
Source§

fn tap_deref_mut_dbg<F, R>(self, func: F) -> Self
where Self: DerefMut, F: FnOnce(&mut Self::Target) -> R,

Calls tap_deref_mut in debug builds, and does nothing in release builds.
Source§

impl<T> TryConv for T

Source§

fn try_conv<T>(self) -> Result<T, Self::Error>
where Self: TryInto<T>,

Attempts to convert self into T using TryInto<T>. Read more
Source§

impl<T> TryConv for T

Source§

fn try_conv<T>(self) -> Result<T, Self::Error>
where Self: TryInto<T>,

Attempts to convert self into a target type. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more