1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
use response::{Response, Serializer, Context, SerdeResponse};

use http;
use serde;

impl<T> Response for Vec<T>
where
    T: serde::Serialize,
{
    type Buf = <SerdeResponse<Self> as Response>::Buf;
    type Body = <SerdeResponse<Self> as Response>::Body;

    fn into_http<S>(self, context: &Context<S>) -> Result<http::Response<Self::Body>, ::Error>
    where
        S: Serializer,
    {
        Response::into_http(SerdeResponse::new(self), context)
    }
}