Struct std::ffi::OsStrUnstable
[-]
[+]
[src]
pub struct OsStr {
// some fields omitted
}Slices into OS strings.
Methods
impl OsStr
fn from_str(s: &str) -> &OsStr
Coerce directly from a &str slice to a &OsStr slice.
fn to_str(&self) -> Option<&str>
Yield a &str slice if the OsStr is valid unicode.
This conversion may entail doing a check for UTF-8 validity.
fn to_string_lossy(&self) -> CowString
Convert an OsStr to a CowString.
Any non-Unicode sequences are replaced with U+FFFD REPLACEMENT CHARACTER.
fn to_os_string(&self) -> OsString
Copy the slice into an onwed OsString.