tower_web/response/vec.rs
1use response::{Response, Serializer, Context, SerdeResponse};
2
3use http;
4use serde;
5
6impl<T> Response for Vec<T>
7where
8 T: serde::Serialize,
9{
10 type Buf = <SerdeResponse<Self> as Response>::Buf;
11 type Body = <SerdeResponse<Self> as Response>::Body;
12
13 fn into_http<S>(self, context: &Context<S>) -> Result<http::Response<Self::Body>, ::Error>
14 where
15 S: Serializer,
16 {
17 Response::into_http(SerdeResponse::new(self), context)
18 }
19}