Skip to main content

encode_bytes

Function encode_bytes 

Source
pub fn encode_bytes(input: &[u8]) -> Cow<'_, [u8]>
Expand description

Percent-encodes a byte slice per RFC 3986.

Returns the input borrowed when every byte is already in the unreserved set, otherwise an owned encoded copy.