mirror of
https://github.com/tokio-rs/tokio.git
synced 2026-09-08 00:00:13 +02:00
Create tokio-codec (#360)
Create a new tokio-codec crate with many of the contents of `tokio_io::codec`.
This commit is contained in:
committed by
Carl Lerche
parent
3d7263d3a0
commit
f723d10087
@@ -1,3 +1,5 @@
|
||||
#![allow(deprecated)]
|
||||
|
||||
use std::io::{self, Read, Write};
|
||||
use std::fmt;
|
||||
|
||||
@@ -13,10 +15,14 @@ use bytes::{BytesMut};
|
||||
/// the `Encoder` and `Decoder` traits to encode and decode frames.
|
||||
///
|
||||
/// You can create a `Framed` instance by using the `AsyncRead::framed` adapter.
|
||||
#[deprecated(since = "0.1.7", note = "Moved to tokio-codec")]
|
||||
#[doc(hidden)]
|
||||
pub struct Framed<T, U> {
|
||||
inner: FramedRead2<FramedWrite2<Fuse<T, U>>>,
|
||||
}
|
||||
|
||||
#[deprecated(since = "0.1.7", note = "Moved to tokio-codec")]
|
||||
#[doc(hidden)]
|
||||
pub struct Fuse<T, U>(pub T, pub U);
|
||||
|
||||
pub fn framed<T, U>(inner: T, codec: U) -> Framed<T, U>
|
||||
|
||||
Reference in New Issue
Block a user