|
rstd 0.1.0
|
An owned, platform-native string. More...
Public Member Functions | |
| auto | as_os_str () const noexcept -> ref< OsStr > |
Returns a borrowed ref<OsStr>. | |
| auto | into_string () -> result::Result< String, OsString > |
Attempts to convert to a String. | |
| void | push (ref< OsStr > s) |
Appends an OsStr to this string. | |
| operator ref< OsStr > () const noexcept | |
Implicit conversion to ref<OsStr>. | |
Static Public Member Functions | |
| static auto | make () -> OsString |
Creates an empty OsString. | |
| static auto | from (String &&s) -> OsString |
Creates an OsString from a String (zero-cost move on Unix). | |
| static auto | from (ref< str > s) -> OsString |
Creates an OsString by copying a ref<str>. | |
| static auto | from (ref< OsStr > s) -> OsString |
Creates an OsString by copying a ref<OsStr>. | |
| static auto | from_encoded_bytes_unchecked (Vec< u8 > &&bytes) -> OsString |
Creates an OsString from raw bytes without validation. | |
An owned, platform-native string.
On Unix this wraps Vec<u8>. Analogous to Rust's OsString.
|
inlineexport |
Attempts to convert to a String.
Returns Err(self) if the bytes are not valid UTF-8.