Skip to main content

os_str_as_bytes_lossy

Function os_str_as_bytes_lossy 

Source
pub fn os_str_as_bytes_lossy(os_string: &OsStr) -> Cow<'_, [u8]>
Expand description

Performs a potentially lossy conversion from OsStr to UTF-8 bytes.

This is always lossless on unix platforms, and wraps OsStr::to_string_lossy on non-unix platforms.