Skip to main content

to_native_encoding

Function to_native_encoding 

Source
pub fn to_native_encoding(
    value: &str,
) -> Result<Vec<u8>, EncodingConversionError>
Expand description

Encodes a string using the current native system encoding.

ยงErrors

Returns EncodingConversionError if the system encoding cannot be detected or the string cannot be represented in it.