Skip to main content

encode

Function encode 

Source
pub fn encode(value: &str) -> String
Expand description

Encode value for an HTTP header: unchanged when it is printable US-ASCII, otherwise a single =?UTF-8?B?<base64>?= encoded-word over its UTF-8 bytes. A control character (which a decoded encoded-word can carry) is encoded too, since a header value cannot hold it.