Struct CaptureConnection
pub struct CaptureConnection { /* private fields */ }
CaptureConnection allows callers to capture Connected information
To capture a connection for a request, use capture_connection.
Implementations
impl CaptureConnection
fn connection_metadata(&self) -> impl Deref<Target = Option<Connected>> + '_Retrieve the connection metadata, if available
async fn wait_for_connection_metadata(&mut self) -> impl Deref<Target = Option<Connected>> + '_Wait for the connection to be established
If a connection was established, this will always return
Some(...). If the request never successfully connected (e.g. DNS resolution failure), this method will never return.
Trait Implementations
impl Clone for CaptureConnection
fn clone(&self) -> CaptureConnection
impl Debug for CaptureConnection
fn fmt(&self, f: &mut Formatter<'_>) -> Result
Auto Trait Implementations
impl !RefUnwindSafe for CaptureConnection
impl !UnwindSafe for CaptureConnection
impl Freeze for CaptureConnection
impl Send for CaptureConnection
impl Sync for CaptureConnection
impl Unpin for CaptureConnection
impl UnsafeUnpin for CaptureConnection
Blanket Implementations
impl<T> Any for CaptureConnection
where
T: 'static + ?Sized,
fn type_id(&self) -> TypeId
impl<T> Borrow<T> for CaptureConnection
where
T: ?Sized,
fn borrow(&self) -> &T
impl<T> BorrowMut<T> for CaptureConnection
where
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
impl<T> CloneToUninit for CaptureConnection
where
T: Clone,
unsafe fn clone_to_uninit(&self, dest: *mut u8)
impl<T> From<T> for CaptureConnection
fn from(t: T) -> TReturns the argument unchanged.
impl<T> Instrument for CaptureConnection
impl<T> ToOwned for CaptureConnection
where
T: Clone,
type Owned = T;fn to_owned(&self) -> Tfn clone_into(&self, target: &mut T)
impl<T> WithSubscriber for CaptureConnection
impl<T, U> Into<U> for CaptureConnection
where
U: From<T>,
fn into(self) -> UCalls
U::from(self).That is, this conversion is whatever the implementation of
[From]<T> for Uchooses to do.
impl<T, U> TryFrom<U> for CaptureConnection
where
U: Into<T>,
type Error = never;fn try_from(value: U) -> Result<T, never>
impl<T, U> TryInto<U> for CaptureConnection
where
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error;fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>