Trait OsStringExt
trait OsStringExt: Sealed
Windows-specific extensions to OsString.
This trait is sealed: it cannot be implemented outside the standard library. This is so that future additional methods are not breaking changes.
Required Methods
fn from_wide(wide: &[u16]) -> SelfCreates an
OsStringfrom a potentially ill-formed UTF-16 slice of 16-bit code units.This is lossless: calling
OsStrExt::encode_wideon the resulting string will always return the original code units.Examples
use OsString; use *; // UTF-16 encoding for "Unicode". let source = ; let string = from_wide;
Implementors
impl OsStringExt for crate::ffi::OsString