mirror of
https://github.com/actix/actix-web.git
synced 2024-11-30 05:21:09 +00:00
add debug impl for H1ServiceResult
This commit is contained in:
parent
3901239128
commit
6b60c9e230
1 changed files with 16 additions and 0 deletions
|
@ -1,4 +1,6 @@
|
||||||
//! HTTP/1 implementation
|
//! HTTP/1 implementation
|
||||||
|
use std::fmt;
|
||||||
|
|
||||||
use actix_net::codec::Framed;
|
use actix_net::codec::Framed;
|
||||||
use bytes::Bytes;
|
use bytes::Bytes;
|
||||||
|
|
||||||
|
@ -23,6 +25,20 @@ pub enum H1ServiceResult<T> {
|
||||||
Unhandled(Request, Framed<T, Codec>),
|
Unhandled(Request, Framed<T, Codec>),
|
||||||
}
|
}
|
||||||
|
|
||||||
|
impl<T: fmt::Debug> fmt::Debug for H1ServiceResult<T> {
|
||||||
|
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
||||||
|
match self {
|
||||||
|
H1ServiceResult::Disconnected => write!(f, "H1ServiceResult::Disconnected"),
|
||||||
|
H1ServiceResult::Shutdown(ref v) => {
|
||||||
|
write!(f, "H1ServiceResult::Shutdown({:?})", v)
|
||||||
|
}
|
||||||
|
H1ServiceResult::Unhandled(ref req, _) => {
|
||||||
|
write!(f, "H1ServiceResult::Unhandled({:?})", req)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug)]
|
||||||
/// Codec message
|
/// Codec message
|
||||||
pub enum Message<T> {
|
pub enum Message<T> {
|
||||||
|
|
Loading…
Reference in a new issue