std::ffi::OsString - Rust (original) (raw)

Struct std::ffi::OsString1.0.0 [−] [src]

pub struct OsString { /* fields omitted */ }

A type that can represent owned, mutable platform-native strings, but is cheaply inter-convertible with Rust strings.

The need for this type arises from the fact that:

OsString and OsStr bridge this gap by simultaneously representing Rust and platform-native string values, and in particular allowing a Rust string to be converted into an "OS" string with no cost if possible.

OsString is to &OsStr as String is to &str: the former in each pair are owned strings; the latter are borrowed references.

From a Rust string: OsString implementsFrom<String>, so you can use my_string.from to create an OsString from a normal Rust string.

From slices: Just like you can start with an empty RustString and then push_str &strsub-string slices into it, you can create an empty OsString with the new method and then push string slices into it with thepush method.

You can use the as_os_str method to get an &OsStr from an OsString; this is effectively a borrowed reference to the whole string.

See the [module's toplevel documentation about conversions][conversions] for a discussion on the traits which OsString implements for conversions from/to native representations.

impl [OsString](../../std/ffi/struct.OsString.html "struct std::ffi::OsString")[src]

pub fn [new](#method.new)() -> [OsString](../../std/ffi/struct.OsString.html "struct std::ffi::OsString")[src]

Constructs a new empty OsString.

use std::ffi::OsString;

let os_string = OsString::new();Run

pub fn [as_os_str](#method.as%5Fos%5Fstr)(&self) -> &[OsStr](../../std/ffi/struct.OsStr.html "struct std::ffi::OsStr")[src]

Converts to an OsStr slice.

use std::ffi::{OsString, OsStr};

let os_string = OsString::from("foo"); let os_str = OsStr::new("foo"); assert_eq!(os_string.as_os_str(), os_str);Run

pub fn [into_string](#method.into%5Fstring)(self) -> [Result](../../std/result/enum.Result.html "enum std::result::Result")<[String](../../std/string/struct.String.html "struct std:🧵:String"), [OsString](../../std/ffi/struct.OsString.html "struct std::ffi::OsString")>[src]

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

On failure, ownership of the original OsString is returned.

use std::ffi::OsString;

let os_string = OsString::from("foo"); let string = os_string.into_string(); assert_eq!(string, Ok(String::from("foo")));Run

pub fn [push](#method.push)<T: [AsRef](../../std/convert/trait.AsRef.html "trait std::convert::AsRef")<[OsStr](../../std/ffi/struct.OsStr.html "struct std::ffi::OsStr")>>(&mut self, s: T)[src]

Extends the string with the given &OsStr slice.

use std::ffi::OsString;

let mut os_string = OsString::from("foo"); os_string.push("bar"); assert_eq!(&os_string, "foobar");Run

pub fn [with_capacity](#method.with%5Fcapacity)(capacity: [usize](../primitive.usize.html)) -> [OsString](../../std/ffi/struct.OsString.html "struct std::ffi::OsString")

1.9.0

[src]

Creates a new OsString with the given capacity.

The string will be able to hold exactly capacity length units of other OS strings without reallocating. If capacity is 0, the string will not allocate.

See main OsString documentation information about encoding.

use std::ffi::OsString;

let mut os_string = OsString::with_capacity(10); let capacity = os_string.capacity();

os_string.push("foo");

assert_eq!(capacity, os_string.capacity());Run

pub fn [clear](#method.clear)(&mut self)

1.9.0

[src]

Truncates the OsString to zero length.

use std::ffi::OsString;

let mut os_string = OsString::from("foo"); assert_eq!(&os_string, "foo");

os_string.clear(); assert_eq!(&os_string, "");Run

pub fn [capacity](#method.capacity)(&self) -> [usize](../primitive.usize.html)

1.9.0

[src]

Returns the capacity this OsString can hold without reallocating.

See OsString introduction for information about encoding.

use std::ffi::OsString;

let mut os_string = OsString::with_capacity(10); assert!(os_string.capacity() >= 10);Run

pub fn [reserve](#method.reserve)(&mut self, additional: [usize](../primitive.usize.html))

1.9.0

[src]

Reserves capacity for at least additional more capacity to be inserted in the given OsString.

The collection may reserve more space to avoid frequent reallocations.

use std::ffi::OsString;

let mut s = OsString::new(); s.reserve(10); assert!(s.capacity() >= 10);Run

pub fn [reserve_exact](#method.reserve%5Fexact)(&mut self, additional: [usize](../primitive.usize.html))

1.9.0

[src]

Reserves the minimum capacity for exactly additional more capacity to be inserted in the given OsString. Does nothing if the capacity is already sufficient.

Note that the allocator may give the collection more space than it requests. Therefore capacity can not be relied upon to be precisely minimal. Prefer reserve if future insertions are expected.

use std::ffi::OsString;

let mut s = OsString::new(); s.reserve_exact(10); assert!(s.capacity() >= 10);Run

pub fn [shrink_to_fit](#method.shrink%5Fto%5Ffit)(&mut self)

1.19.0

[src]

Shrinks the capacity of the OsString to match its length.

use std::ffi::OsString;

let mut s = OsString::from("foo");

s.reserve(100); assert!(s.capacity() >= 100);

s.shrink_to_fit(); assert_eq!(3, s.capacity());Run

ⓘImportant traits for Box

pub fn [into_boxed_os_str](#method.into%5Fboxed%5Fos%5Fstr)(self) -> [Box](../../std/boxed/struct.Box.html "struct std::boxed::Box")<[OsStr](../../std/ffi/struct.OsStr.html "struct std::ffi::OsStr")>

1.20.0

[src]

Converts this OsString into a boxed OsStr.

use std::ffi::{OsString, OsStr};

let s = OsString::from("hello");

let b: Box = s.into_boxed_os_str();Run

pub fn [to_str](#method.to%5Fstr)(&self) -> [Option](../../std/option/enum.Option.html "enum std::option::Option")<&[str](../primitive.str.html)>[src]

Yields a &str slice if the OsStr is valid Unicode.

This conversion may entail doing a check for UTF-8 validity.

use std::ffi::OsStr;

let os_str = OsStr::new("foo"); assert_eq!(os_str.to_str(), Some("foo"));Run

pub fn [to_string_lossy](#method.to%5Fstring%5Flossy)(&self) -> [Cow](../../std/borrow/enum.Cow.html "enum std::borrow::Cow")<[str](../primitive.str.html)>[src]

Converts an OsStr to a Cow<str>.

Any non-Unicode sequences are replaced with U+FFFD REPLACEMENT CHARACTER.

Calling to_string_lossy on an OsStr with valid unicode:

use std::ffi::OsStr;

let os_str = OsStr::new("foo"); assert_eq!(os_str.to_string_lossy(), "foo");Run

Had os_str contained invalid unicode, the to_string_lossy call might have returned "fo�".

pub fn [to_os_string](#method.to%5Fos%5Fstring)(&self) -> [OsString](../../std/ffi/struct.OsString.html "struct std::ffi::OsString")[src]

Copies the slice into an owned OsString.

use std::ffi::{OsStr, OsString};

let os_str = OsStr::new("foo"); let os_string = os_str.to_os_string(); assert_eq!(os_string, OsString::from("foo"));Run

pub fn [is_empty](#method.is%5Fempty)(&self) -> [bool](../primitive.bool.html)

1.9.0

[src]

Checks whether the OsStr is empty.

use std::ffi::OsStr;

let os_str = OsStr::new(""); assert!(os_str.is_empty());

let os_str = OsStr::new("foo"); assert!(!os_str.is_empty());Run

pub fn [len](#method.len)(&self) -> [usize](../primitive.usize.html)

1.9.0

[src]

Returns the length of this OsStr.

Note that this does not return the number of bytes in this string as, for example, OS strings on Windows are encoded as a list of u16rather than a list of bytes. This number is simply useful for passing to other methods like OsString::with_capacity to avoid reallocations.

See OsStr introduction for more information about encoding.

use std::ffi::OsStr;

let os_str = OsStr::new(""); assert_eq!(os_str.len(), 0);

let os_str = OsStr::new("foo"); assert_eq!(os_str.len(), 3);Run

impl [Clone](../../std/clone/trait.Clone.html "trait std::clone::Clone") for [OsString](../../std/ffi/struct.OsString.html "struct std::ffi::OsString")[src]

impl [From](../../std/convert/trait.From.html "trait std::convert::From")<[String](../../std/string/struct.String.html "struct std:🧵:String")> for [OsString](../../std/ffi/struct.OsString.html "struct std::ffi::OsString")[src]

impl<'a, T: ?[Sized](../../std/marker/trait.Sized.html "trait std:📑:Sized") + [AsRef](../../std/convert/trait.AsRef.html "trait std::convert::AsRef")<[OsStr](../../std/ffi/struct.OsStr.html "struct std::ffi::OsStr")>> [From](../../std/convert/trait.From.html "trait std::convert::From")<[&'a ](../primitive.reference.html)T> for [OsString](../../std/ffi/struct.OsString.html "struct std::ffi::OsString")[src]

impl [Index](../../std/ops/trait.Index.html "trait std::ops::Index")<[RangeFull](../../std/ops/struct.RangeFull.html "struct std::ops::RangeFull")> for [OsString](../../std/ffi/struct.OsString.html "struct std::ffi::OsString")[src]

impl [Deref](../../std/ops/trait.Deref.html "trait std::ops::Deref") for [OsString](../../std/ffi/struct.OsString.html "struct std::ffi::OsString")[src]

impl [Default](../../std/default/trait.Default.html "trait std::default::Default") for [OsString](../../std/ffi/struct.OsString.html "struct std::ffi::OsString")

1.9.0

[src]

impl [Debug](../../std/fmt/trait.Debug.html "trait std::fmt::Debug") for [OsString](../../std/ffi/struct.OsString.html "struct std::ffi::OsString")[src]

impl [PartialEq](../../std/cmp/trait.PartialEq.html "trait std::cmp::PartialEq") for [OsString](../../std/ffi/struct.OsString.html "struct std::ffi::OsString")[src]

impl [PartialEq](../../std/cmp/trait.PartialEq.html "trait std::cmp::PartialEq")<[str](../primitive.str.html)> for [OsString](../../std/ffi/struct.OsString.html "struct std::ffi::OsString")[src]

fn [eq](../../std/cmp/trait.PartialEq.html#tymethod.eq)(&self, other: &[str](../primitive.str.html)) -> [bool](../primitive.bool.html)[src]

This method tests for self and other values to be equal, and is used by ==. Read more

fn [ne](../../std/cmp/trait.PartialEq.html#method.ne)(&self, other: [&](../primitive.reference.html)Rhs) -> [bool](../primitive.bool.html)[src]

This method tests for !=.

impl [PartialEq](../../std/cmp/trait.PartialEq.html "trait std::cmp::PartialEq")<[OsString](../../std/ffi/struct.OsString.html "struct std::ffi::OsString")> for [str](../primitive.str.html)[src]

impl [Eq](../../std/cmp/trait.Eq.html "trait std::cmp::Eq") for [OsString](../../std/ffi/struct.OsString.html "struct std::ffi::OsString")[src]

impl [PartialOrd](../../std/cmp/trait.PartialOrd.html "trait std::cmp::PartialOrd") for [OsString](../../std/ffi/struct.OsString.html "struct std::ffi::OsString")[src]

impl [PartialOrd](../../std/cmp/trait.PartialOrd.html "trait std::cmp::PartialOrd")<[str](../primitive.str.html)> for [OsString](../../std/ffi/struct.OsString.html "struct std::ffi::OsString")[src]

fn [partial_cmp](../../std/cmp/trait.PartialOrd.html#tymethod.partial%5Fcmp)(&self, other: &[str](../primitive.str.html)) -> [Option](../../std/option/enum.Option.html "enum std::option::Option")<[Ordering](../../std/cmp/enum.Ordering.html "enum std::cmp::Ordering")>[src]

This method returns an ordering between self and other values if one exists. Read more

fn [lt](../../std/cmp/trait.PartialOrd.html#method.lt)(&self, other: [&](../primitive.reference.html)Rhs) -> [bool](../primitive.bool.html)[src]

This method tests less than (for self and other) and is used by the < operator. Read more

fn [le](../../std/cmp/trait.PartialOrd.html#method.le)(&self, other: [&](../primitive.reference.html)Rhs) -> [bool](../primitive.bool.html)[src]

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more

fn [gt](../../std/cmp/trait.PartialOrd.html#method.gt)(&self, other: [&](../primitive.reference.html)Rhs) -> [bool](../primitive.bool.html)[src]

This method tests greater than (for self and other) and is used by the > operator. Read more

fn [ge](../../std/cmp/trait.PartialOrd.html#method.ge)(&self, other: [&](../primitive.reference.html)Rhs) -> [bool](../primitive.bool.html)[src]

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more

impl [Ord](../../std/cmp/trait.Ord.html "trait std::cmp::Ord") for [OsString](../../std/ffi/struct.OsString.html "struct std::ffi::OsString")[src]

impl [Hash](../../std/hash/trait.Hash.html "trait std::hash::Hash") for [OsString](../../std/ffi/struct.OsString.html "struct std::ffi::OsString")[src]

impl [From](../../std/convert/trait.From.html "trait std::convert::From")<[Box](../../std/boxed/struct.Box.html "struct std::boxed::Box")<[OsStr](../../std/ffi/struct.OsStr.html "struct std::ffi::OsStr")>> for [OsString](../../std/ffi/struct.OsString.html "struct std::ffi::OsString")

1.18.0

[src]

impl [From](../../std/convert/trait.From.html "trait std::convert::From")<[OsString](../../std/ffi/struct.OsString.html "struct std::ffi::OsString")> for [Box](../../std/boxed/struct.Box.html "struct std::boxed::Box")<[OsStr](../../std/ffi/struct.OsStr.html "struct std::ffi::OsStr")>

1.20.0

[src]

impl [From](../../std/convert/trait.From.html "trait std::convert::From")<[OsString](../../std/ffi/struct.OsString.html "struct std::ffi::OsString")> for [Arc](../../std/sync/struct.Arc.html "struct std::sync::Arc")<[OsStr](../../std/ffi/struct.OsStr.html "struct std::ffi::OsStr")>

1.24.0

[src]

impl [From](../../std/convert/trait.From.html "trait std::convert::From")<[OsString](../../std/ffi/struct.OsString.html "struct std::ffi::OsString")> for [Rc](../../std/rc/struct.Rc.html "struct std::rc::Rc")<[OsStr](../../std/ffi/struct.OsStr.html "struct std::ffi::OsStr")>

1.24.0

[src]

impl<'a, 'b> [PartialEq](../../std/cmp/trait.PartialEq.html "trait std::cmp::PartialEq")<[OsStr](../../std/ffi/struct.OsStr.html "struct std::ffi::OsStr")> for [OsString](../../std/ffi/struct.OsString.html "struct std::ffi::OsString")

1.8.0

[src]

fn [eq](../../std/cmp/trait.PartialEq.html#tymethod.eq)(&self, other: &[OsStr](../../std/ffi/struct.OsStr.html "struct std::ffi::OsStr")) -> [bool](../primitive.bool.html)[src]

This method tests for self and other values to be equal, and is used by ==. Read more

fn [ne](../../std/cmp/trait.PartialEq.html#method.ne)(&self, other: [&](../primitive.reference.html)Rhs) -> [bool](../primitive.bool.html)[src]

This method tests for !=.

impl<'a, 'b> [PartialEq](../../std/cmp/trait.PartialEq.html "trait std::cmp::PartialEq")<[OsString](../../std/ffi/struct.OsString.html "struct std::ffi::OsString")> for [OsStr](../../std/ffi/struct.OsStr.html "struct std::ffi::OsStr")

1.8.0

[src]

impl<'a, 'b> [PartialOrd](../../std/cmp/trait.PartialOrd.html "trait std::cmp::PartialOrd")<[OsStr](../../std/ffi/struct.OsStr.html "struct std::ffi::OsStr")> for [OsString](../../std/ffi/struct.OsString.html "struct std::ffi::OsString")

1.8.0

[src]

fn [partial_cmp](../../std/cmp/trait.PartialOrd.html#tymethod.partial%5Fcmp)(&self, other: &[OsStr](../../std/ffi/struct.OsStr.html "struct std::ffi::OsStr")) -> [Option](../../std/option/enum.Option.html "enum std::option::Option")<[Ordering](../../std/cmp/enum.Ordering.html "enum std::cmp::Ordering")>[src]

This method returns an ordering between self and other values if one exists. Read more

fn [lt](../../std/cmp/trait.PartialOrd.html#method.lt)(&self, other: [&](../primitive.reference.html)Rhs) -> [bool](../primitive.bool.html)[src]

This method tests less than (for self and other) and is used by the < operator. Read more

fn [le](../../std/cmp/trait.PartialOrd.html#method.le)(&self, other: [&](../primitive.reference.html)Rhs) -> [bool](../primitive.bool.html)[src]

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more

fn [gt](../../std/cmp/trait.PartialOrd.html#method.gt)(&self, other: [&](../primitive.reference.html)Rhs) -> [bool](../primitive.bool.html)[src]

This method tests greater than (for self and other) and is used by the > operator. Read more

fn [ge](../../std/cmp/trait.PartialOrd.html#method.ge)(&self, other: [&](../primitive.reference.html)Rhs) -> [bool](../primitive.bool.html)[src]

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more

impl<'a, 'b> [PartialOrd](../../std/cmp/trait.PartialOrd.html "trait std::cmp::PartialOrd")<[OsString](../../std/ffi/struct.OsString.html "struct std::ffi::OsString")> for [OsStr](../../std/ffi/struct.OsStr.html "struct std::ffi::OsStr")

1.8.0

[src]

fn [partial_cmp](../../std/cmp/trait.PartialOrd.html#tymethod.partial%5Fcmp)(&self, other: &[OsString](../../std/ffi/struct.OsString.html "struct std::ffi::OsString")) -> [Option](../../std/option/enum.Option.html "enum std::option::Option")<[Ordering](../../std/cmp/enum.Ordering.html "enum std::cmp::Ordering")>[src]

This method returns an ordering between self and other values if one exists. Read more

fn [lt](../../std/cmp/trait.PartialOrd.html#method.lt)(&self, other: [&](../primitive.reference.html)Rhs) -> [bool](../primitive.bool.html)[src]

This method tests less than (for self and other) and is used by the < operator. Read more

fn [le](../../std/cmp/trait.PartialOrd.html#method.le)(&self, other: [&](../primitive.reference.html)Rhs) -> [bool](../primitive.bool.html)[src]

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more

fn [gt](../../std/cmp/trait.PartialOrd.html#method.gt)(&self, other: [&](../primitive.reference.html)Rhs) -> [bool](../primitive.bool.html)[src]

This method tests greater than (for self and other) and is used by the > operator. Read more

fn [ge](../../std/cmp/trait.PartialOrd.html#method.ge)(&self, other: [&](../primitive.reference.html)Rhs) -> [bool](../primitive.bool.html)[src]

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more

impl<'a, 'b> [PartialEq](../../std/cmp/trait.PartialEq.html "trait std::cmp::PartialEq")<&'a [OsStr](../../std/ffi/struct.OsStr.html "struct std::ffi::OsStr")> for [OsString](../../std/ffi/struct.OsString.html "struct std::ffi::OsString")

1.8.0

[src]

fn [eq](../../std/cmp/trait.PartialEq.html#tymethod.eq)(&self, other: &&'a [OsStr](../../std/ffi/struct.OsStr.html "struct std::ffi::OsStr")) -> [bool](../primitive.bool.html)[src]

This method tests for self and other values to be equal, and is used by ==. Read more

fn [ne](../../std/cmp/trait.PartialEq.html#method.ne)(&self, other: [&](../primitive.reference.html)Rhs) -> [bool](../primitive.bool.html)[src]

This method tests for !=.

impl<'a, 'b> [PartialEq](../../std/cmp/trait.PartialEq.html "trait std::cmp::PartialEq")<[OsString](../../std/ffi/struct.OsString.html "struct std::ffi::OsString")> for &'a [OsStr](../../std/ffi/struct.OsStr.html "struct std::ffi::OsStr")

1.8.0

[src]

impl<'a, 'b> [PartialOrd](../../std/cmp/trait.PartialOrd.html "trait std::cmp::PartialOrd")<&'a [OsStr](../../std/ffi/struct.OsStr.html "struct std::ffi::OsStr")> for [OsString](../../std/ffi/struct.OsString.html "struct std::ffi::OsString")

1.8.0

[src]

fn [partial_cmp](../../std/cmp/trait.PartialOrd.html#tymethod.partial%5Fcmp)(&self, other: &&'a [OsStr](../../std/ffi/struct.OsStr.html "struct std::ffi::OsStr")) -> [Option](../../std/option/enum.Option.html "enum std::option::Option")<[Ordering](../../std/cmp/enum.Ordering.html "enum std::cmp::Ordering")>[src]

This method returns an ordering between self and other values if one exists. Read more

fn [lt](../../std/cmp/trait.PartialOrd.html#method.lt)(&self, other: [&](../primitive.reference.html)Rhs) -> [bool](../primitive.bool.html)[src]

This method tests less than (for self and other) and is used by the < operator. Read more

fn [le](../../std/cmp/trait.PartialOrd.html#method.le)(&self, other: [&](../primitive.reference.html)Rhs) -> [bool](../primitive.bool.html)[src]

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more

fn [gt](../../std/cmp/trait.PartialOrd.html#method.gt)(&self, other: [&](../primitive.reference.html)Rhs) -> [bool](../primitive.bool.html)[src]

This method tests greater than (for self and other) and is used by the > operator. Read more

fn [ge](../../std/cmp/trait.PartialOrd.html#method.ge)(&self, other: [&](../primitive.reference.html)Rhs) -> [bool](../primitive.bool.html)[src]

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more

impl<'a, 'b> [PartialOrd](../../std/cmp/trait.PartialOrd.html "trait std::cmp::PartialOrd")<[OsString](../../std/ffi/struct.OsString.html "struct std::ffi::OsString")> for &'a [OsStr](../../std/ffi/struct.OsStr.html "struct std::ffi::OsStr")

1.8.0

[src]

fn [partial_cmp](../../std/cmp/trait.PartialOrd.html#tymethod.partial%5Fcmp)(&self, other: &[OsString](../../std/ffi/struct.OsString.html "struct std::ffi::OsString")) -> [Option](../../std/option/enum.Option.html "enum std::option::Option")<[Ordering](../../std/cmp/enum.Ordering.html "enum std::cmp::Ordering")>[src]

This method returns an ordering between self and other values if one exists. Read more

fn [lt](../../std/cmp/trait.PartialOrd.html#method.lt)(&self, other: [&](../primitive.reference.html)Rhs) -> [bool](../primitive.bool.html)[src]

This method tests less than (for self and other) and is used by the < operator. Read more

fn [le](../../std/cmp/trait.PartialOrd.html#method.le)(&self, other: [&](../primitive.reference.html)Rhs) -> [bool](../primitive.bool.html)[src]

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more

fn [gt](../../std/cmp/trait.PartialOrd.html#method.gt)(&self, other: [&](../primitive.reference.html)Rhs) -> [bool](../primitive.bool.html)[src]

This method tests greater than (for self and other) and is used by the > operator. Read more

fn [ge](../../std/cmp/trait.PartialOrd.html#method.ge)(&self, other: [&](../primitive.reference.html)Rhs) -> [bool](../primitive.bool.html)[src]

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more

impl<'a, 'b> [PartialEq](../../std/cmp/trait.PartialEq.html "trait std::cmp::PartialEq")<[OsString](../../std/ffi/struct.OsString.html "struct std::ffi::OsString")> for [Cow](../../std/borrow/enum.Cow.html "enum std::borrow::Cow")<'a, [OsStr](../../std/ffi/struct.OsStr.html "struct std::ffi::OsStr")>

1.8.0

[src]

impl<'a, 'b> [PartialEq](../../std/cmp/trait.PartialEq.html "trait std::cmp::PartialEq")<[Cow](../../std/borrow/enum.Cow.html "enum std::borrow::Cow")<'a, [OsStr](../../std/ffi/struct.OsStr.html "struct std::ffi::OsStr")>> for [OsString](../../std/ffi/struct.OsString.html "struct std::ffi::OsString")

1.8.0

[src]

impl<'a, 'b> [PartialOrd](../../std/cmp/trait.PartialOrd.html "trait std::cmp::PartialOrd")<[OsString](../../std/ffi/struct.OsString.html "struct std::ffi::OsString")> for [Cow](../../std/borrow/enum.Cow.html "enum std::borrow::Cow")<'a, [OsStr](../../std/ffi/struct.OsStr.html "struct std::ffi::OsStr")>

1.8.0

[src]

fn [partial_cmp](../../std/cmp/trait.PartialOrd.html#tymethod.partial%5Fcmp)(&self, other: &[OsString](../../std/ffi/struct.OsString.html "struct std::ffi::OsString")) -> [Option](../../std/option/enum.Option.html "enum std::option::Option")<[Ordering](../../std/cmp/enum.Ordering.html "enum std::cmp::Ordering")>[src]

This method returns an ordering between self and other values if one exists. Read more

fn [lt](../../std/cmp/trait.PartialOrd.html#method.lt)(&self, other: [&](../primitive.reference.html)Rhs) -> [bool](../primitive.bool.html)[src]

This method tests less than (for self and other) and is used by the < operator. Read more

fn [le](../../std/cmp/trait.PartialOrd.html#method.le)(&self, other: [&](../primitive.reference.html)Rhs) -> [bool](../primitive.bool.html)[src]

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more

fn [gt](../../std/cmp/trait.PartialOrd.html#method.gt)(&self, other: [&](../primitive.reference.html)Rhs) -> [bool](../primitive.bool.html)[src]

This method tests greater than (for self and other) and is used by the > operator. Read more

fn [ge](../../std/cmp/trait.PartialOrd.html#method.ge)(&self, other: [&](../primitive.reference.html)Rhs) -> [bool](../primitive.bool.html)[src]

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more

impl<'a, 'b> [PartialOrd](../../std/cmp/trait.PartialOrd.html "trait std::cmp::PartialOrd")<[Cow](../../std/borrow/enum.Cow.html "enum std::borrow::Cow")<'a, [OsStr](../../std/ffi/struct.OsStr.html "struct std::ffi::OsStr")>> for [OsString](../../std/ffi/struct.OsString.html "struct std::ffi::OsString")

1.8.0

[src]

fn [partial_cmp](../../std/cmp/trait.PartialOrd.html#tymethod.partial%5Fcmp)(&self, other: &[Cow](../../std/borrow/enum.Cow.html "enum std::borrow::Cow")<'a, [OsStr](../../std/ffi/struct.OsStr.html "struct std::ffi::OsStr")>) -> [Option](../../std/option/enum.Option.html "enum std::option::Option")<[Ordering](../../std/cmp/enum.Ordering.html "enum std::cmp::Ordering")>[src]

This method returns an ordering between self and other values if one exists. Read more

fn [lt](../../std/cmp/trait.PartialOrd.html#method.lt)(&self, other: [&](../primitive.reference.html)Rhs) -> [bool](../primitive.bool.html)[src]

This method tests less than (for self and other) and is used by the < operator. Read more

fn [le](../../std/cmp/trait.PartialOrd.html#method.le)(&self, other: [&](../primitive.reference.html)Rhs) -> [bool](../primitive.bool.html)[src]

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more

fn [gt](../../std/cmp/trait.PartialOrd.html#method.gt)(&self, other: [&](../primitive.reference.html)Rhs) -> [bool](../primitive.bool.html)[src]

This method tests greater than (for self and other) and is used by the > operator. Read more

fn [ge](../../std/cmp/trait.PartialOrd.html#method.ge)(&self, other: [&](../primitive.reference.html)Rhs) -> [bool](../primitive.bool.html)[src]

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more

impl [Borrow](../../std/borrow/trait.Borrow.html "trait std::borrow::Borrow")<[OsStr](../../std/ffi/struct.OsStr.html "struct std::ffi::OsStr")> for [OsString](../../std/ffi/struct.OsString.html "struct std::ffi::OsString")[src]

impl [AsRef](../../std/convert/trait.AsRef.html "trait std::convert::AsRef")<[OsStr](../../std/ffi/struct.OsStr.html "struct std::ffi::OsStr")> for [OsString](../../std/ffi/struct.OsString.html "struct std::ffi::OsString")[src]

impl [From](../../std/convert/trait.From.html "trait std::convert::From")<[OsString](../../std/ffi/struct.OsString.html "struct std::ffi::OsString")> for [PathBuf](../../std/path/struct.PathBuf.html "struct std::path::PathBuf")[src]

impl [From](../../std/convert/trait.From.html "trait std::convert::From")<[PathBuf](../../std/path/struct.PathBuf.html "struct std::path::PathBuf")> for [OsString](../../std/ffi/struct.OsString.html "struct std::ffi::OsString")

1.14.0

[src]

impl [AsRef](../../std/convert/trait.AsRef.html "trait std::convert::AsRef")<[Path](../../std/path/struct.Path.html "struct std::path::Path")> for [OsString](../../std/ffi/struct.OsString.html "struct std::ffi::OsString")[src]

impl<'a, 'b> [PartialEq](../../std/cmp/trait.PartialEq.html "trait std::cmp::PartialEq")<[OsString](../../std/ffi/struct.OsString.html "struct std::ffi::OsString")> for [PathBuf](../../std/path/struct.PathBuf.html "struct std::path::PathBuf")

1.8.0

[src]

impl<'a, 'b> [PartialEq](../../std/cmp/trait.PartialEq.html "trait std::cmp::PartialEq")<[PathBuf](../../std/path/struct.PathBuf.html "struct std::path::PathBuf")> for [OsString](../../std/ffi/struct.OsString.html "struct std::ffi::OsString")

1.8.0

[src]

impl<'a, 'b> [PartialOrd](../../std/cmp/trait.PartialOrd.html "trait std::cmp::PartialOrd")<[OsString](../../std/ffi/struct.OsString.html "struct std::ffi::OsString")> for [PathBuf](../../std/path/struct.PathBuf.html "struct std::path::PathBuf")

1.8.0

[src]

fn [partial_cmp](../../std/cmp/trait.PartialOrd.html#tymethod.partial%5Fcmp)(&self, other: &[OsString](../../std/ffi/struct.OsString.html "struct std::ffi::OsString")) -> [Option](../../std/option/enum.Option.html "enum std::option::Option")<[Ordering](../../std/cmp/enum.Ordering.html "enum std::cmp::Ordering")>[src]

This method returns an ordering between self and other values if one exists. Read more

fn [lt](../../std/cmp/trait.PartialOrd.html#method.lt)(&self, other: [&](../primitive.reference.html)Rhs) -> [bool](../primitive.bool.html)[src]

This method tests less than (for self and other) and is used by the < operator. Read more

fn [le](../../std/cmp/trait.PartialOrd.html#method.le)(&self, other: [&](../primitive.reference.html)Rhs) -> [bool](../primitive.bool.html)[src]

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more

fn [gt](../../std/cmp/trait.PartialOrd.html#method.gt)(&self, other: [&](../primitive.reference.html)Rhs) -> [bool](../primitive.bool.html)[src]

This method tests greater than (for self and other) and is used by the > operator. Read more

fn [ge](../../std/cmp/trait.PartialOrd.html#method.ge)(&self, other: [&](../primitive.reference.html)Rhs) -> [bool](../primitive.bool.html)[src]

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more

impl<'a, 'b> [PartialOrd](../../std/cmp/trait.PartialOrd.html "trait std::cmp::PartialOrd")<[PathBuf](../../std/path/struct.PathBuf.html "struct std::path::PathBuf")> for [OsString](../../std/ffi/struct.OsString.html "struct std::ffi::OsString")

1.8.0

[src]

fn [partial_cmp](../../std/cmp/trait.PartialOrd.html#tymethod.partial%5Fcmp)(&self, other: &[PathBuf](../../std/path/struct.PathBuf.html "struct std::path::PathBuf")) -> [Option](../../std/option/enum.Option.html "enum std::option::Option")<[Ordering](../../std/cmp/enum.Ordering.html "enum std::cmp::Ordering")>[src]

This method returns an ordering between self and other values if one exists. Read more

fn [lt](../../std/cmp/trait.PartialOrd.html#method.lt)(&self, other: [&](../primitive.reference.html)Rhs) -> [bool](../primitive.bool.html)[src]

This method tests less than (for self and other) and is used by the < operator. Read more

fn [le](../../std/cmp/trait.PartialOrd.html#method.le)(&self, other: [&](../primitive.reference.html)Rhs) -> [bool](../primitive.bool.html)[src]

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more

fn [gt](../../std/cmp/trait.PartialOrd.html#method.gt)(&self, other: [&](../primitive.reference.html)Rhs) -> [bool](../primitive.bool.html)[src]

This method tests greater than (for self and other) and is used by the > operator. Read more

fn [ge](../../std/cmp/trait.PartialOrd.html#method.ge)(&self, other: [&](../primitive.reference.html)Rhs) -> [bool](../primitive.bool.html)[src]

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more

impl<'a, 'b> [PartialEq](../../std/cmp/trait.PartialEq.html "trait std::cmp::PartialEq")<[OsString](../../std/ffi/struct.OsString.html "struct std::ffi::OsString")> for [Path](../../std/path/struct.Path.html "struct std::path::Path")

1.8.0

[src]

impl<'a, 'b> [PartialEq](../../std/cmp/trait.PartialEq.html "trait std::cmp::PartialEq")<[Path](../../std/path/struct.Path.html "struct std::path::Path")> for [OsString](../../std/ffi/struct.OsString.html "struct std::ffi::OsString")

1.8.0

[src]

fn [eq](../../std/cmp/trait.PartialEq.html#tymethod.eq)(&self, other: &[Path](../../std/path/struct.Path.html "struct std::path::Path")) -> [bool](../primitive.bool.html)[src]

This method tests for self and other values to be equal, and is used by ==. Read more

fn [ne](../../std/cmp/trait.PartialEq.html#method.ne)(&self, other: [&](../primitive.reference.html)Rhs) -> [bool](../primitive.bool.html)[src]

This method tests for !=.

impl<'a, 'b> [PartialOrd](../../std/cmp/trait.PartialOrd.html "trait std::cmp::PartialOrd")<[OsString](../../std/ffi/struct.OsString.html "struct std::ffi::OsString")> for [Path](../../std/path/struct.Path.html "struct std::path::Path")

1.8.0

[src]

fn [partial_cmp](../../std/cmp/trait.PartialOrd.html#tymethod.partial%5Fcmp)(&self, other: &[OsString](../../std/ffi/struct.OsString.html "struct std::ffi::OsString")) -> [Option](../../std/option/enum.Option.html "enum std::option::Option")<[Ordering](../../std/cmp/enum.Ordering.html "enum std::cmp::Ordering")>[src]

This method returns an ordering between self and other values if one exists. Read more

fn [lt](../../std/cmp/trait.PartialOrd.html#method.lt)(&self, other: [&](../primitive.reference.html)Rhs) -> [bool](../primitive.bool.html)[src]

This method tests less than (for self and other) and is used by the < operator. Read more

fn [le](../../std/cmp/trait.PartialOrd.html#method.le)(&self, other: [&](../primitive.reference.html)Rhs) -> [bool](../primitive.bool.html)[src]

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more

fn [gt](../../std/cmp/trait.PartialOrd.html#method.gt)(&self, other: [&](../primitive.reference.html)Rhs) -> [bool](../primitive.bool.html)[src]

This method tests greater than (for self and other) and is used by the > operator. Read more

fn [ge](../../std/cmp/trait.PartialOrd.html#method.ge)(&self, other: [&](../primitive.reference.html)Rhs) -> [bool](../primitive.bool.html)[src]

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more

impl<'a, 'b> [PartialOrd](../../std/cmp/trait.PartialOrd.html "trait std::cmp::PartialOrd")<[Path](../../std/path/struct.Path.html "struct std::path::Path")> for [OsString](../../std/ffi/struct.OsString.html "struct std::ffi::OsString")

1.8.0

[src]

fn [partial_cmp](../../std/cmp/trait.PartialOrd.html#tymethod.partial%5Fcmp)(&self, other: &[Path](../../std/path/struct.Path.html "struct std::path::Path")) -> [Option](../../std/option/enum.Option.html "enum std::option::Option")<[Ordering](../../std/cmp/enum.Ordering.html "enum std::cmp::Ordering")>[src]

This method returns an ordering between self and other values if one exists. Read more

fn [lt](../../std/cmp/trait.PartialOrd.html#method.lt)(&self, other: [&](../primitive.reference.html)Rhs) -> [bool](../primitive.bool.html)[src]

This method tests less than (for self and other) and is used by the < operator. Read more

fn [le](../../std/cmp/trait.PartialOrd.html#method.le)(&self, other: [&](../primitive.reference.html)Rhs) -> [bool](../primitive.bool.html)[src]

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more

fn [gt](../../std/cmp/trait.PartialOrd.html#method.gt)(&self, other: [&](../primitive.reference.html)Rhs) -> [bool](../primitive.bool.html)[src]

This method tests greater than (for self and other) and is used by the > operator. Read more

fn [ge](../../std/cmp/trait.PartialOrd.html#method.ge)(&self, other: [&](../primitive.reference.html)Rhs) -> [bool](../primitive.bool.html)[src]

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more

impl<'a, 'b> [PartialEq](../../std/cmp/trait.PartialEq.html "trait std::cmp::PartialEq")<[OsString](../../std/ffi/struct.OsString.html "struct std::ffi::OsString")> for &'a [Path](../../std/path/struct.Path.html "struct std::path::Path")

1.8.0

[src]

impl<'a, 'b> [PartialEq](../../std/cmp/trait.PartialEq.html "trait std::cmp::PartialEq")<&'a [Path](../../std/path/struct.Path.html "struct std::path::Path")> for [OsString](../../std/ffi/struct.OsString.html "struct std::ffi::OsString")

1.8.0

[src]

fn [eq](../../std/cmp/trait.PartialEq.html#tymethod.eq)(&self, other: &&'a [Path](../../std/path/struct.Path.html "struct std::path::Path")) -> [bool](../primitive.bool.html)[src]

This method tests for self and other values to be equal, and is used by ==. Read more

fn [ne](../../std/cmp/trait.PartialEq.html#method.ne)(&self, other: [&](../primitive.reference.html)Rhs) -> [bool](../primitive.bool.html)[src]

This method tests for !=.

impl<'a, 'b> [PartialOrd](../../std/cmp/trait.PartialOrd.html "trait std::cmp::PartialOrd")<[OsString](../../std/ffi/struct.OsString.html "struct std::ffi::OsString")> for &'a [Path](../../std/path/struct.Path.html "struct std::path::Path")

1.8.0

[src]

fn [partial_cmp](../../std/cmp/trait.PartialOrd.html#tymethod.partial%5Fcmp)(&self, other: &[OsString](../../std/ffi/struct.OsString.html "struct std::ffi::OsString")) -> [Option](../../std/option/enum.Option.html "enum std::option::Option")<[Ordering](../../std/cmp/enum.Ordering.html "enum std::cmp::Ordering")>[src]

This method returns an ordering between self and other values if one exists. Read more

fn [lt](../../std/cmp/trait.PartialOrd.html#method.lt)(&self, other: [&](../primitive.reference.html)Rhs) -> [bool](../primitive.bool.html)[src]

This method tests less than (for self and other) and is used by the < operator. Read more

fn [le](../../std/cmp/trait.PartialOrd.html#method.le)(&self, other: [&](../primitive.reference.html)Rhs) -> [bool](../primitive.bool.html)[src]

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more

fn [gt](../../std/cmp/trait.PartialOrd.html#method.gt)(&self, other: [&](../primitive.reference.html)Rhs) -> [bool](../primitive.bool.html)[src]

This method tests greater than (for self and other) and is used by the > operator. Read more

fn [ge](../../std/cmp/trait.PartialOrd.html#method.ge)(&self, other: [&](../primitive.reference.html)Rhs) -> [bool](../primitive.bool.html)[src]

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more

impl<'a, 'b> [PartialOrd](../../std/cmp/trait.PartialOrd.html "trait std::cmp::PartialOrd")<&'a [Path](../../std/path/struct.Path.html "struct std::path::Path")> for [OsString](../../std/ffi/struct.OsString.html "struct std::ffi::OsString")

1.8.0

[src]

fn [partial_cmp](../../std/cmp/trait.PartialOrd.html#tymethod.partial%5Fcmp)(&self, other: &&'a [Path](../../std/path/struct.Path.html "struct std::path::Path")) -> [Option](../../std/option/enum.Option.html "enum std::option::Option")<[Ordering](../../std/cmp/enum.Ordering.html "enum std::cmp::Ordering")>[src]

This method returns an ordering between self and other values if one exists. Read more

fn [lt](../../std/cmp/trait.PartialOrd.html#method.lt)(&self, other: [&](../primitive.reference.html)Rhs) -> [bool](../primitive.bool.html)[src]

This method tests less than (for self and other) and is used by the < operator. Read more

fn [le](../../std/cmp/trait.PartialOrd.html#method.le)(&self, other: [&](../primitive.reference.html)Rhs) -> [bool](../primitive.bool.html)[src]

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more

fn [gt](../../std/cmp/trait.PartialOrd.html#method.gt)(&self, other: [&](../primitive.reference.html)Rhs) -> [bool](../primitive.bool.html)[src]

This method tests greater than (for self and other) and is used by the > operator. Read more

fn [ge](../../std/cmp/trait.PartialOrd.html#method.ge)(&self, other: [&](../primitive.reference.html)Rhs) -> [bool](../primitive.bool.html)[src]

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more

impl<'a, 'b> [PartialEq](../../std/cmp/trait.PartialEq.html "trait std::cmp::PartialEq")<[OsString](../../std/ffi/struct.OsString.html "struct std::ffi::OsString")> for [Cow](../../std/borrow/enum.Cow.html "enum std::borrow::Cow")<'a, [Path](../../std/path/struct.Path.html "struct std::path::Path")>

1.8.0

[src]

impl<'a, 'b> [PartialEq](../../std/cmp/trait.PartialEq.html "trait std::cmp::PartialEq")<[Cow](../../std/borrow/enum.Cow.html "enum std::borrow::Cow")<'a, [Path](../../std/path/struct.Path.html "struct std::path::Path")>> for [OsString](../../std/ffi/struct.OsString.html "struct std::ffi::OsString")

1.8.0

[src]

fn [eq](../../std/cmp/trait.PartialEq.html#tymethod.eq)(&self, other: &[Cow](../../std/borrow/enum.Cow.html "enum std::borrow::Cow")<'a, [Path](../../std/path/struct.Path.html "struct std::path::Path")>) -> [bool](../primitive.bool.html)[src]

This method tests for self and other values to be equal, and is used by ==. Read more

fn [ne](../../std/cmp/trait.PartialEq.html#method.ne)(&self, other: [&](../primitive.reference.html)Rhs) -> [bool](../primitive.bool.html)[src]

This method tests for !=.

impl<'a, 'b> [PartialOrd](../../std/cmp/trait.PartialOrd.html "trait std::cmp::PartialOrd")<[OsString](../../std/ffi/struct.OsString.html "struct std::ffi::OsString")> for [Cow](../../std/borrow/enum.Cow.html "enum std::borrow::Cow")<'a, [Path](../../std/path/struct.Path.html "struct std::path::Path")>

1.8.0

[src]

fn [partial_cmp](../../std/cmp/trait.PartialOrd.html#tymethod.partial%5Fcmp)(&self, other: &[OsString](../../std/ffi/struct.OsString.html "struct std::ffi::OsString")) -> [Option](../../std/option/enum.Option.html "enum std::option::Option")<[Ordering](../../std/cmp/enum.Ordering.html "enum std::cmp::Ordering")>[src]

This method returns an ordering between self and other values if one exists. Read more

fn [lt](../../std/cmp/trait.PartialOrd.html#method.lt)(&self, other: [&](../primitive.reference.html)Rhs) -> [bool](../primitive.bool.html)[src]

This method tests less than (for self and other) and is used by the < operator. Read more

fn [le](../../std/cmp/trait.PartialOrd.html#method.le)(&self, other: [&](../primitive.reference.html)Rhs) -> [bool](../primitive.bool.html)[src]

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more

fn [gt](../../std/cmp/trait.PartialOrd.html#method.gt)(&self, other: [&](../primitive.reference.html)Rhs) -> [bool](../primitive.bool.html)[src]

This method tests greater than (for self and other) and is used by the > operator. Read more

fn [ge](../../std/cmp/trait.PartialOrd.html#method.ge)(&self, other: [&](../primitive.reference.html)Rhs) -> [bool](../primitive.bool.html)[src]

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more

impl<'a, 'b> [PartialOrd](../../std/cmp/trait.PartialOrd.html "trait std::cmp::PartialOrd")<[Cow](../../std/borrow/enum.Cow.html "enum std::borrow::Cow")<'a, [Path](../../std/path/struct.Path.html "struct std::path::Path")>> for [OsString](../../std/ffi/struct.OsString.html "struct std::ffi::OsString")

1.8.0

[src]

fn [partial_cmp](../../std/cmp/trait.PartialOrd.html#tymethod.partial%5Fcmp)(&self, other: &[Cow](../../std/borrow/enum.Cow.html "enum std::borrow::Cow")<'a, [Path](../../std/path/struct.Path.html "struct std::path::Path")>) -> [Option](../../std/option/enum.Option.html "enum std::option::Option")<[Ordering](../../std/cmp/enum.Ordering.html "enum std::cmp::Ordering")>[src]

This method returns an ordering between self and other values if one exists. Read more

fn [lt](../../std/cmp/trait.PartialOrd.html#method.lt)(&self, other: [&](../primitive.reference.html)Rhs) -> [bool](../primitive.bool.html)[src]

This method tests less than (for self and other) and is used by the < operator. Read more

fn [le](../../std/cmp/trait.PartialOrd.html#method.le)(&self, other: [&](../primitive.reference.html)Rhs) -> [bool](../primitive.bool.html)[src]

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more

fn [gt](../../std/cmp/trait.PartialOrd.html#method.gt)(&self, other: [&](../primitive.reference.html)Rhs) -> [bool](../primitive.bool.html)[src]

This method tests greater than (for self and other) and is used by the > operator. Read more

fn [ge](../../std/cmp/trait.PartialOrd.html#method.ge)(&self, other: [&](../primitive.reference.html)Rhs) -> [bool](../primitive.bool.html)[src]

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more

impl [OsStringExt](../../std/os/unix/ffi/trait.OsStringExt.html "trait std::os::unix::ffi::OsStringExt") for [OsString](../../std/ffi/struct.OsString.html "struct std::ffi::OsString")[src]

impl [OsStringExt](../../std/os/windows/ffi/trait.OsStringExt.html "trait std::os::windows::ffi::OsStringExt") for [OsString](../../std/ffi/struct.OsString.html "struct std::ffi::OsString")[src]