Struct opentelemetry::trace::WithContext
source · pub struct WithContext<T> { /* private fields */ }
Expand description
A future, stream, or sink that has an associated context.
Trait Implementations§
source§impl<T: Clone> Clone for WithContext<T>
impl<T: Clone> Clone for WithContext<T>
source§impl<T: Debug> Debug for WithContext<T>
impl<T: Debug> Debug for WithContext<T>
source§impl<T: Future> Future for WithContext<T>
impl<T: Future> Future for WithContext<T>
source§impl<I, T> Sink<I> for WithContext<T>where
T: Sink<I>,
impl<I, T> Sink<I> for WithContext<T>where
T: Sink<I>,
source§fn poll_ready(
self: Pin<&mut Self>,
task_cx: &mut TaskContext<'_>,
) -> Poll<Result<(), Self::Error>>
fn poll_ready( self: Pin<&mut Self>, task_cx: &mut TaskContext<'_>, ) -> Poll<Result<(), Self::Error>>
Attempts to prepare the
Sink
to receive a value. Read moresource§fn start_send(self: Pin<&mut Self>, item: I) -> Result<(), Self::Error>
fn start_send(self: Pin<&mut Self>, item: I) -> Result<(), Self::Error>
Begin the process of sending a value to the sink.
Each call to this function must be preceded by a successful call to
poll_ready
which returned Poll::Ready(Ok(()))
. Read moresource§impl<T: Stream> Stream for WithContext<T>
impl<T: Stream> Stream for WithContext<T>
impl<'__pin, T> Unpin for WithContext<T>where
__Origin<'__pin, T>: Unpin,
Auto Trait Implementations§
impl<T> Freeze for WithContext<T>where
T: Freeze,
impl<T> !RefUnwindSafe for WithContext<T>
impl<T> Send for WithContext<T>where
T: Send,
impl<T> Sync for WithContext<T>where
T: Sync,
impl<T> !UnwindSafe for WithContext<T>
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
Mutably borrows from an owned value. Read more
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)source§impl<T> FutureExt for T
impl<T> FutureExt for T
source§fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
source§fn with_current_context(self) -> WithContext<Self> ⓘ
fn with_current_context(self) -> WithContext<Self> ⓘ
source§impl<F> IntoFuture for Fwhere
F: Future,
impl<F> IntoFuture for Fwhere
F: Future,
§type IntoFuture = F
type IntoFuture = F
Which kind of future are we turning this into?
source§fn into_future(self) -> <F as IntoFuture>::IntoFuture
fn into_future(self) -> <F as IntoFuture>::IntoFuture
Creates a future from a value. Read more