1
0
mirror of https://github.com/fafhrd91/actix-web synced 2025-09-02 01:31:57 +02:00

make possible to use async handler

This commit is contained in:
Nikolay Kim
2017-11-03 13:35:34 -07:00
parent ec3b139273
commit c14e6c9008
6 changed files with 42 additions and 2 deletions

View File

@@ -2,6 +2,8 @@ use std::rc::Rc;
use std::sync::Arc;
use bytes::{Bytes, BytesMut};
use route::Frame;
/// Represents various types of http message body.
#[derive(Debug)]
@@ -185,6 +187,11 @@ impl AsRef<[u8]> for BinaryBody {
}
}
impl From<BinaryBody> for Frame {
fn from(b: BinaryBody) -> Frame {
Frame::Payload(Some(b))
}
}
#[cfg(test)]
mod tests {