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>
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§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§type Error = <T as Sink<I>>::Error
type Error = <T as Sink<I>>::Error
The type of value produced by the sink when an error occurs.
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§fn poll_flush(
self: Pin<&mut Self>,
task_cx: &mut TaskContext<'_>,
) -> Poll<Result<(), Self::Error>>
fn poll_flush( self: Pin<&mut Self>, task_cx: &mut TaskContext<'_>, ) -> Poll<Result<(), Self::Error>>
Flush any remaining output from this sink. Read more
source§fn poll_close(
self: Pin<&mut Self>,
task_cx: &mut TaskContext<'_>,
) -> Poll<Result<(), Self::Error>>
fn poll_close( self: Pin<&mut Self>, task_cx: &mut TaskContext<'_>, ) -> Poll<Result<(), Self::Error>>
Flush any remaining output and close this sink, if necessary. Read more
source§impl<T: Stream> Stream for WithContext<T>
impl<T: Stream> Stream for WithContext<T>
impl<'__pin, T> Unpin for WithContext<T>where
PinnedFieldsOf<__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§unsafe fn clone_to_uninit(&self, dst: *mut T)
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,
source§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