http-serde-ext 0.1.0

serde support for http crate types Request, Response, Uri, StatusCode, HeaderMap
Documentation
1
2
3
4
5
6
7
8
type Type = http::Method;
const EXPECT_MESSAGE: &str = "valid method name";

serialize_as_str!(Type);
create_visitor!(Visitor, Type, EXPECT_MESSAGE, (visit_str, &str));
deserialize_from_str!(Visitor, Type);

derive_extension_types!(super::Type);