Create tokio-codec (#360)

Create a new tokio-codec crate with many of the contents of
`tokio_io::codec`.
This commit is contained in:
Bryan Burgers
2018-06-04 20:36:06 -07:00
committed by Carl Lerche
parent 3d7263d3a0
commit f723d10087
42 changed files with 1100 additions and 23 deletions
+3
View File
@@ -3,6 +3,7 @@ use bytes::BufMut;
use futures::{Async, Poll};
use {framed, split, AsyncWrite};
#[allow(deprecated)]
use codec::{Decoder, Encoder, Framed};
use split::{ReadHalf, WriteHalf};
@@ -129,6 +130,8 @@ pub trait AsyncRead: std_io::Read {
/// If you want to work more directly with the streams and sink, consider
/// calling `split` on the `Framed` returned by this method, which will
/// break them into separate objects, allowing them to interact more easily.
#[deprecated(since = "0.1.7", note = "Use tokio_codec::Decoder::framed instead")]
#[allow(deprecated)]
fn framed<T: Encoder + Decoder>(self, codec: T) -> Framed<Self, T>
where Self: AsyncWrite + Sized,
{