Add varint-rs

This commit is contained in:
Vurich
2017-11-01 11:59:52 +01:00
parent 34be11f676
commit 8148b298b2
8 changed files with 722 additions and 1 deletions

View File

@ -0,0 +1,22 @@
extern crate tokio_io;
extern crate futures;
use futures::stream::Stream;
use tokio_io::{AsyncRead, AsyncWrite};
pub trait StreamMuxer {
type Substream: AsyncRead + AsyncWrite;
type InboundSubstreams: Stream<Item = Self::Substream>;
type OutboundSubstreams: Stream<Item = Self::Substream>;
fn inbound(&mut self) -> Self::InboundSubstreams;
fn outbound(&mut self) -> Self::OutboundSubstreams;
}
#[cfg(test)]
mod tests {
#[test]
fn it_works() {
assert_eq!(2 + 2, 4);
}
}