pub struct WithContext<T> { /* private fields */ }
Available on crate feature
trace
only.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> ⓘ
Available on crate feature
trace
only.Source§fn with_current_context(self) -> WithContext<Self> ⓘ
fn with_current_context(self) -> WithContext<Self> ⓘ
Available on crate feature
trace
only.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<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