diff options
author | Eliza Weisman <eliza@buoyant.io> | 2018-08-24 12:54:42 -0700 |
---|---|---|
committer | Toby Lawrence <tobz@users.noreply.github.com> | 2018-08-24 15:54:42 -0400 |
commit | 2e88e29fe923828ad1f6b5ea15beda0fcb219a01 (patch) | |
tree | e9d66d3c60499a3824144622f7b9d3d8718f8779 /tokio-io | |
parent | 07203408de5c9e11566470cc4a43b1f6f4fef02a (diff) |
Move `tokio_io::codec::length_delimited` module to `tokio::codec` (#568)
* Deprecate tokio-io::length_delimited
* Move `length_delimited` into `tokio::codec`
Signed-off-by: Eliza Weisman <eliza@buoyant.io>
Diffstat (limited to 'tokio-io')
-rw-r--r-- | tokio-io/src/codec/mod.rs | 2 | ||||
-rw-r--r-- | tokio-io/src/length_delimited.rs | 10 |
2 files changed, 12 insertions, 0 deletions
diff --git a/tokio-io/src/codec/mod.rs b/tokio-io/src/codec/mod.rs index 8f7bc28a..6ef3d5e9 100644 --- a/tokio-io/src/codec/mod.rs +++ b/tokio-io/src/codec/mod.rs @@ -32,6 +32,8 @@ pub use framed::{Framed, FramedParts}; pub use framed_read::FramedRead; pub use framed_write::FramedWrite; +#[deprecated(since = "0.1.8", note = "Moved to tokio-codec")] +#[doc(hidden)] pub mod length_delimited { //! Frame a stream of bytes based on a length prefix //! diff --git a/tokio-io/src/length_delimited.rs b/tokio-io/src/length_delimited.rs index 6b552f2b..52ebdfaa 100644 --- a/tokio-io/src/length_delimited.rs +++ b/tokio-io/src/length_delimited.rs @@ -16,6 +16,8 @@ use std::io::{self, Cursor}; /// `Builder` enables constructing configured length delimited framers. Note /// that not all configuration settings apply to both encoding and decoding. See /// the documentation for specific methods for more detail. +#[deprecated(since = "0.1.8", note = "Moved to tokio-codec")] +#[doc(hidden)] #[derive(Debug, Clone, Copy)] pub struct Builder { // Maximum frame length @@ -44,6 +46,8 @@ pub struct Builder { /// See [module level] documentation for more detail. /// /// [module level]: index.html +#[deprecated(since = "0.1.8", note = "Moved to tokio-codec")] +#[doc(hidden)] pub struct Framed<T, B: IntoBuf = BytesMut> { inner: FramedRead<FramedWrite<T, B>>, } @@ -53,12 +57,16 @@ pub struct Framed<T, B: IntoBuf = BytesMut> { /// See [module level] documentation for more detail. /// /// [module level]: index.html +#[deprecated(since = "0.1.8", note = "Moved to tokio-codec")] +#[doc(hidden)] #[derive(Debug)] pub struct FramedRead<T> { inner: codec::FramedRead<T, Decoder>, } /// An error when the number of bytes read is more than max frame length. +#[deprecated(since = "0.1.8", note = "Moved to tokio-codec")] +#[doc(hidden)] pub struct FrameTooBig { _priv: (), } @@ -83,6 +91,8 @@ enum DecodeState { /// See [module level] documentation for more detail. /// /// [module level]: index.html +#[deprecated(since = "0.1.8", note = "Moved to tokio-codec")] +#[doc(hidden)] pub struct FramedWrite<T, B: IntoBuf = BytesMut> { // I/O type inner: T, |