quoted_printable

Function encode_with_options

Source
pub fn encode_with_options<R: AsRef<[u8]>>(input: R, options: Options) -> String
Expand description

Encodes some bytes into quoted-printable format, using the provided options.

The quoted-printable transfer-encoding is defined in IETF RFC 2045, section 6.7. This function encodes a set of raw bytes into a format conformant with that spec. The output contains CRLF pairs as needed so that each line is wrapped to 76 characters or less (not including the CRLF).

ยงExamples

    use quoted_printable::{encode_with_options, Options};
    let encoded = encode_with_options("hello, \u{20ac} zone!", Options::default());
    assert_eq!("hello, =E2=82=AC zone!", encoded);