Trait OsStrExt
trait OsStrExt: Sealed
Windows-specific extensions to OsStr.
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 encode_wide(self: &Self) -> EncodeWide<'_>Re-encodes an
OsStras a wide character sequence, i.e., potentially ill-formed UTF-16.This is lossless: calling
OsStringExt::from_wideand thenencode_wideon the result will yield the original code units. Note that the encoding does not add a final null terminator.Examples
use OsString; use *; // UTF-16 encoding for "Unicode". let source = ; let string = from_wide; let result: = string.encode_wide.collect; assert_eq!;
Implementors
impl OsStrExt for crate::ffi::OsStr