Skip to content

Instantly share code, notes, and snippets.

@rust-play
rust-play / playground.rs
Created February 27, 2019 20:10
Code shared from the Rust Playground
use futures::sink::Sink;
use futures::stream::Stream;
use futures::sync::mpsc::channel;
use futures::future::Future;
use futures::stream;
use futures::StartSend;
use futures::{Poll, Async, AsyncSink};
trait SendableSink<I,E>: Sink<SinkItem=I, SinkError=E> + Send + 'static {}
impl<T, I, E> SendableSink<I,E> for T where T: Sink<SinkItem=I, SinkError=E> + Send + 'static {}