Function hyper_serde::serialize

source ยท
pub fn serialize<T, S>(value: &T, serializer: S) -> Result<S::Ok, S::Error>
where S: Serializer, for<'a> Ser<'a, T>: Serialize,
Expand description

Serialises value with a given serializer.

This is useful to serialize Hyper types used in structure fields or tuple members with #[serde(serialize_with = "hyper_serde::serialize")].