pub trait ContextStreamExt<Stream> {
// Required method
fn with_context<'a>(
self,
ctx: impl Into<ContextRef<'a>>,
) -> StreamWithContext<'a, Stream>
where Self: Sized;
}
Required Methods§
Sourcefn with_context<'a>(
self,
ctx: impl Into<ContextRef<'a>>,
) -> StreamWithContext<'a, Stream>where
Self: Sized,
fn with_context<'a>(
self,
ctx: impl Into<ContextRef<'a>>,
) -> StreamWithContext<'a, Stream>where
Self: Sized,
Wraps a stream with a context, allowing the stream to be stopped when the context is done