1
0
mirror of https://github.com/actix/actix-extras.git synced 2025-06-30 20:04:26 +02:00

refactor client payload processing

This commit is contained in:
Nikolay Kim
2018-02-24 07:29:35 +03:00
parent ea8e8e75a2
commit 4e41e13baf
12 changed files with 468 additions and 149 deletions

View File

@ -128,7 +128,7 @@ impl PayloadWriter for PayloadType {
}
}
enum Decoder {
pub(crate) enum Decoder {
Deflate(Box<DeflateDecoder<Writer<BytesMut>>>),
Gzip(Option<Box<GzDecoder<Wrapper>>>),
Br(Box<BrotliDecoder<Writer<BytesMut>>>),
@ -137,9 +137,9 @@ enum Decoder {
// should go after write::GzDecoder get implemented
#[derive(Debug)]
struct Wrapper {
buf: BytesMut,
eof: bool,
pub(crate) struct Wrapper {
pub buf: BytesMut,
pub eof: bool,
}
impl io::Read for Wrapper {