Struct std::ffi::OsStringUnstable [-] [+] [src]

pub struct OsString {
    // some fields omitted
}

Owned, mutable OS strings.

Methods

impl OsString

fn from_string(s: String) -> OsString

Constructs an OsString at no cost by consuming a String.

fn from_str(s: &str) -> OsString

Constructs an OsString by copying from a &str slice.

Equivalent to: OsString::from_string(String::from_str(s)).

fn new() -> OsString

Constructs a new empty OsString.

fn into_string(self) -> Result<String, OsString>

Convert the OsString into a String if it contains valid Unicode data.

On failure, ownership of the original OsString is returned.

fn push_os_str(&mut self, s: &OsStr)

Extend the string with the given &OsStr slice.

Trait Implementations

impl Index<RangeFull> for OsString

type Output = OsStr

fn index(&self, _index: &RangeFull) -> &OsStr

impl Deref for OsString

type Target = OsStr

fn deref(&self) -> &OsStr

impl Debug for OsString

fn fmt(&self, formatter: &mut Formatter) -> Result<(), Error>

impl PartialEq for OsString

fn eq(&self, other: &OsString) -> bool

fn ne(&self, other: &Rhs) -> bool

impl PartialEq<str> for OsString

fn eq(&self, other: &str) -> bool

fn ne(&self, other: &Rhs) -> bool

impl Eq for OsString

impl PartialOrd for OsString

fn partial_cmp(&self, other: &OsString) -> Option<Ordering>

fn lt(&self, other: &OsString) -> bool

fn le(&self, other: &OsString) -> bool

fn gt(&self, other: &OsString) -> bool

fn ge(&self, other: &OsString) -> bool

impl PartialOrd<str> for OsString

fn partial_cmp(&self, other: &str) -> Option<Ordering>

fn lt(&self, other: &Rhs) -> bool

fn le(&self, other: &Rhs) -> bool

fn gt(&self, other: &Rhs) -> bool

fn ge(&self, other: &Rhs) -> bool

impl Ord for OsString

fn cmp(&self, other: &OsString) -> Ordering

impl Hash for OsString

fn hash<H: Hasher>(&self, state: &mut H)

fn hash_slice<H>(data: &[Self], state: &mut H) where H: Hasher

impl Borrow<OsStr> for OsString

fn borrow(&self) -> &OsStr

impl AsOsStr for OsString

fn as_os_str(&self) -> &OsStr

impl OsStringExt for OsString

fn from_vec(vec: Vec<u8>) -> OsString

fn into_vec(self) -> Vec<u8>

impl OsStringExt for OsString

fn from_vec(vec: Vec<u8>) -> OsString

fn into_vec(self) -> Vec<u8>

Derived Implementations

impl Clone for OsString

fn clone(&self) -> OsString

fn clone_from(&mut self, source: &Self)