Skip to main content

Crate serde_urlencoded

Crate serde_urlencoded 

Source
Expand description

x-www-form-urlencoded meets Serde.

This crate serialises to and deserialises from the application/x-www-form-urlencoded format. It is built upon Serde, a high performance generic serialization framework, and the form_urlencoded crate in this workspace.

§Example

let params = vec![("key", "value"), ("foo", "bar")];
let body = serde_urlencoded::to_string(&params).unwrap();
assert_eq!(body, "key=value&foo=bar");

Modules§

de
Deserialization support for the application/x-www-form-urlencoded format.
ser
Serialization support for the application/x-www-form-urlencoded format.

Structs§

Deserializer
A deserializer for the application/x-www-form-urlencoded format.
Serializer
A serializer for the application/x-www-form-urlencoded format.

Functions§

from_bytes
Deserializes a application/x-www-form-urlencoded value from a &[u8].
from_reader
Convenience function that reads all bytes from reader and deserializes them with from_bytes.
from_str
Deserializes a application/x-www-form-urlencoded value from a &str.
to_string
Serializes a value into a application/x-www-form-urlencoded String buffer.