scuffle_context

Trait ContextStreamExt

Source
pub trait ContextStreamExt<Stream> {
    // Required method
    fn with_context<'a>(
        self,
        ctx: impl Into<ContextRef<'a>>,
    ) -> StreamWithContext<'a, Stream>
       where Self: Sized;
}

Required Methods§

Source

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

Implementors§