Function arf_strings::host_os_str_to_bytes
source · pub fn host_os_str_to_bytes(host: &OsStr) -> Result<Cow<'_, [u8]>>
Expand description
Convert an &OsStr
produced by POSIX-style APIs into a Cow<[u8]>
which
is either plain UTF-8 or an ARF encoding. Returns an error if the input
string contains NUL bytes.