Struct std::ffi::OsStringStable
[-] [+]
[src]
pub struct OsString {
// some fields omitted
}Owned, mutable OS strings.
Methods
impl OsString
fn new() -> OsString
Constructs a new empty OsString.
fn from_bytes<B>(bytes: B) -> Option<OsString> where B: Into<Vec<u8>>
Constructs an OsString from a byte sequence.
Platform behavior
On Unix systems, any byte sequence can be successfully
converted into an OsString.
On Windows system, only UTF-8 byte sequences will successfully
convert; non UTF-8 data will produce None.
fn as_os_str(&self) -> &OsStr
Converts to an OsStr slice.
fn into_string(self) -> Result<String, OsString>
Converts the OsString into a String if it contains valid Unicode data.
On failure, ownership of the original OsString is returned.
fn push<T: AsRef<OsStr>>(&mut self, s: T)
Extends the string with the given &OsStr slice.