[][src]Function hyper_serde::serialize_pretty

pub fn serialize_pretty<T, S>(
    value: &T,
    serializer: S
) -> Result<S::Ok, S::Error> where
    S: Serializer,
    Ser<'a, T>: Serialize

Serialises value with a given serializer in a pretty way.

This does the same job as serialize but with a prettier format for some combinations of types and serialisers.

For now, the only change from serialize is when serialising Headers, where the items in the header values get serialised as strings instead of sequences of bytes, if they represent UTF-8 text.