pub fn os_str_as_bytes(os_string: &OsStr) -> Result<&[u8], NonUtf8OsStrError>Expand description
Converts an OsStr to a UTF-8 &[u8].
This always succeeds on unix platforms, and fails on other platforms if the string can’t be coerced to UTF-8.
pub fn os_str_as_bytes(os_string: &OsStr) -> Result<&[u8], NonUtf8OsStrError>Converts an OsStr to a UTF-8 &[u8].
This always succeeds on unix platforms, and fails on other platforms if the string can’t be coerced to UTF-8.