Struct HipOsStr

Source
pub struct HipOsStr<'borrow, B>(/* private fields */)
where
    B: Backend;
Available on crate feature std only.
Expand description

Smart OS string, i.e. shared and cheaply clonable OS string.

Internally used the same representations as HipByt.

§Examples

You can create a HipStr from anything that implements OsStr, typically:

with From:

let hello = HipOsStr::from("Hello");

When possible, HipOsStr::from takes ownership of the underlying string buffer:

let world_os = OsStr::new("World").to_os_string();
let world = HipOsStr::from(world_os); // here there is only one heap-allocation

For borrowing string slice, you can also use the no-copy HipOsStr::borrowed (like Cow::Borrowed):

let hello = HipOsStr::borrowed("Hello, world!");

§Representations

Like HipByt, HipOsStr has three possible internal representations:

  • borrow
  • inline string
  • shared heap allocated string

Implementations§

Source§

impl<'borrow, B> HipOsStr<'borrow, B>
where B: Backend,

Source

pub const fn new() -> Self

Creates an empty HipOsStr.

Function provided for OsString::new replacement.

§⚠️ Stability warning!

The used representation of the empty string is unspecified. It may be borrowed or inlined but will never be allocated.

§Examples

Basic usage:

let s = HipOsStr::new();
Source

pub fn with_capacity(cap: usize) -> Self

Creates a new HipOsStr with the given capacity.

The final capacity depends on the representation and is not guaranteed to be exact. However, the returned HipOsStr will be able to hold at least capacity bytes without reallocating or changing representation.

§Representation

If the capacity is less or equal to the inline capacity, the representation will be inline.

Otherwise, it will be allocated.

The representation is not normalized.

§Examples

Basic usage:

let mut s = HipOsStr::with_capacity(42);
for _ in 0..42 {
    s.push("*");
}
assert_eq!(s, OsStr::new(&"*".repeat(42)));
Source

pub fn borrowed<S: AsRef<OsStr> + ?Sized>(value: &'borrow S) -> Self

Creates a new HipOsStr from an OS string slice without copying the slice.

Requires only impl AsRef<OsStr>: it accepts &str, &OsStr, and &Path for instance.

To create a HipOsStr from a 'static string slice const-ly, see HipOsStr::from_static.

§Representation

The created HipOsStr is borrowed.

§Examples

Basic usage:

let s = HipOsStr::borrowed("hello");
assert_eq!(s.len(), 5);
Source

pub const fn is_inline(&self) -> bool

Returns true if this HipOsStr uses the inline representation, false otherwise.

§Examples

Basic usage:

let s = HipOsStr::borrowed("hello");
assert!(!s.is_inline());

let s = HipOsStr::from("hello");
assert!(s.is_inline());

let s = HipOsStr::from("hello".repeat(10));
assert!(!s.is_inline());
Source

pub const fn is_borrowed(&self) -> bool

Returns true if this HipOsStr is a static string borrow, false otherwise.

§Examples

Basic usage:

let s = HipOsStr::borrowed("hello");
assert!(s.is_borrowed());

let s = HipOsStr::from("hello");
assert!(!s.is_borrowed());

let s = HipOsStr::from("hello".repeat(10));
assert!(!s.is_borrowed());
Source

pub const fn is_allocated(&self) -> bool

Returns true if this HipOsStr is a shared heap-allocated string, false otherwise.

§Examples

Basic usage:

let s = HipOsStr::borrowed("hello");
assert!(!s.is_allocated());

let s = HipOsStr::from("hello");
assert!(!s.is_allocated());

let s = HipOsStr::from("hello".repeat(10));
assert!(s.is_allocated());
Source

pub fn into_borrowed(self) -> Result<&'borrow OsStr, Self>

Converts self into a string slice with the 'borrow lifetime if this HipOsStr is backed by a borrow.

§Errors

Returns Err(self) if this HipOsStr is not borrowed.

§Examples

Basic usage:

let borrowed: &'static OsStr= "hipstr".as_ref();
let s = HipOsStr::borrowed(borrowed);
let c = s.into_borrowed();
assert_eq!(c, Ok(borrowed));
assert!(std::ptr::eq(borrowed, c.unwrap()));
Source

pub const fn as_borrowed(&self) -> Option<&'borrow OsStr>

Returns the borrowed slice if this HipOsStr is actually borrowed, None otherwise.

§Examples
let abc: &'static OsStr = OsStr::new("abc");
let s = HipOsStr::borrowed(abc);
let c: Option<&'static OsStr> = s.as_borrowed();
assert_eq!(c, Some(abc));
assert!(std::ptr::eq(abc, c.unwrap()));

let s2 = HipOsStr::from(abc);
assert!(s2.as_borrowed().is_none());
Source

pub const fn len(&self) -> usize

Returns the length of this HipOsStr, in bytes, not chars or graphemes. In other words, it might not be what a human considers the length of the string.

As noted in OsStr::len, the length is not the number of bytes used by the OS representation of this string, but by the Rust interoperabilty format which may differ significantly from both the OS representation and the native Rust representation.

§Examples

Basic usage:

let a = HipOsStr::from("(c)");
assert_eq!(a.len(), 3);

let b = HipOsStr::from("®");
assert_eq!(b.len(), 2);
assert_eq!(b.to_str().unwrap().chars().count(), 1);
Source

pub const fn is_empty(&self) -> bool

Returns true if this HipOsStr has a length of zero, and false otherwise.

§Examples

Basic usage:

let a = HipOsStr::new();
assert!(a.is_empty());

let b = HipOsStr::borrowed("ab");
assert!(!b.is_empty());
Source

pub fn into_bytes(self) -> HipByt<'borrow, B>

Converts a HipOsStr into a HipByt.

It consumes the HipOsStr without copying the content (if shared or borrowed).

§Examples

Basic usage:

let s = HipOsStr::from("hello");
let b = s.into_bytes();

assert_eq!(&[104, 101, 108, 108, 111][..], &b[..]);
Source

pub fn as_os_str(&self) -> &OsStr

Extracts an OsStr slice of the entire HipOsStr.

§Examples

Basic usage:

let s = HipOsStr::from("foobar");

assert_eq!(OsStr::new("foobar"), s.as_os_str());
Source

pub const fn inline_capacity() -> usize

Returns the maximal length (in bytes) of inline string.

Source

pub fn capacity(&self) -> usize

Returns the total number of bytes the backend can hold.

§Example
let mut s: String = String::with_capacity(42);
s.extend('a'..='z');
let string = HipOsStr::from(s);
assert_eq!(string.len(), 26);
assert_eq!(string.capacity(), 42);

let string2 = string.clone();
assert_eq!(string.capacity(), 42);
Source

pub fn into_os_string(self) -> Result<OsString, Self>

Converts self into an OsString without clone or allocation if possible.

§Errors

Returns Err(self) if it is impossible to take ownership of the string backing this HipOsStr.

Source

pub fn mutate(&mut self) -> RefMut<'_, 'borrow, B>

Returns a mutable handle to the underlying OsString.

This operation may reallocate a new string if either:

  • the representation is not an allocated buffer (inline array or borrow),
  • the underlying buffer is shared.
§Examples
let mut s = HipOsStr::borrowed("abc");
{
    let mut r = s.mutate();
    r.push("def");
    assert_eq!(r.as_os_str(), OsStr::new("abcdef"));
}
assert_eq!(s, OsStr::new("abcdef"));
Source

pub fn push(&mut self, addition: impl AsRef<OsStr>)

Appends a given string slice onto the end of this HipOsStr.

§Examples

Basic usage:

let mut s = HipOsStr::from("cork");
s.push("screw");
assert_eq!(s, OsStr::new("corkscrew"));
Source

pub fn into_owned(self) -> HipOsStr<'static, B>

Makes the string owned, copying the data if it is actually borrowed.

let s: String = ('a'..'z').collect();
let s2 = s.clone();
let h = HipOsStr::borrowed(&s[..]);
// drop(s); // err, s is borrowed
let h = h.into_owned();
drop(s); // ok
assert_eq!(h, OsStr::new(&s2));
Source

pub fn into_str(self) -> Result<HipStr<'borrow, B>, Self>

Converts the HipOsStr into a HipStr if it contains valid Unicode data.

§Errors

If it contains invalid Unicode data, ownership of the original HipOsStr is returned.

§Examples

let os = HipOsStr::from("foo");
let s = os.into_str();
assert_eq!(s, Ok(HipStr::from("foo")));
Source

pub fn to_str(&self) -> Option<HipStr<'borrow, B>>

Converts a HipOsStr into a HipStr if the content is valid Unicode.

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

§Examples
let os_str = HipOsStr::from("foo");
assert_eq!(os_str.to_str(), Some(HipStr::from("foo")));
Source

pub fn to_str_lossy(&self) -> HipStr<'borrow, B>

Converts a HipOsStr to a HipStr.

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

§Examples

Calling to_str_lossy on an HipStr with invalid unicode:

// Note, due to differences in how Unix and Windows represent strings,
// we are forced to complicate this example, setting up example `HipOsStr`s
// with different source data and via different platform extensions.
// Understand that in reality you could end up with such example invalid
// sequences simply through collecting user command line arguments, for
// example.

#[cfg(unix)] {
    use std::ffi::OsStr;
    use std::os::unix::ffi::OsStrExt;

    // Here, the values 0x66 and 0x6f correspond to 'f' and 'o'
    // respectively. The value 0x80 is a lone continuation byte, invalid
    // in a UTF-8 sequence.
    let source = [0x66, 0x6f, 0x80, 0x6f];
    let os_str = OsStr::from_bytes(&source[..]);
    let hip_os_str = HipOsStr::from(os_str);

    assert_eq!(hip_os_str.to_str_lossy(), "fo�o");
}
#[cfg(windows)] {
    use std::ffi::OsString;
    use std::os::windows::prelude::*;

    // Here the values 0x0066 and 0x006f correspond to 'f' and 'o'
    // respectively. The value 0xD800 is a lone surrogate half, invalid
    // in a UTF-16 sequence.
    let source = [0x0066, 0x006f, 0xD800, 0x006f];
    let os_string = OsString::from_wide(&source[..]);
    let hip_os_str = HipOsStr::from(os_string);

    assert_eq!(hip_os_str.to_str_lossy(), "fo�o");
}
Source

pub fn slice_ref(&self, slice: &OsStr) -> Self

Extracts a slice as its own HipOsStr based on the given subslice &OsStr.

§Panics

Panics if slice is not part of self.

§Examples

Basic usage:

let a = HipOsStr::from("abc/def");
let p: &Path = a.as_ref();
let n: &OsStr = p.file_name().unwrap();
assert_eq!(a.slice_ref(n), HipOsStr::from("def"));
Source

pub fn try_slice_ref(&self, slice: &OsStr) -> Option<Self>

Returns a slice as it own HipStr based on the given subslice &OsStr.

§Errors

Returns None if slice is not a part of self.

§Examples

Basic usage:

let a = HipOsStr::from("abc");
let sl: &OsStr = unsafe { OsStr::from_encoded_bytes_unchecked(&a.as_encoded_bytes()[0..2]) };
assert_eq!(a.try_slice_ref(sl), Some(HipOsStr::from("ab")));
assert!(a.try_slice_ref("z".as_ref()).is_none());
Source

pub fn slice_ref_unchecked(&self, slice: &OsStr) -> Self

Extracts a slice as its own HipOsStr based on the given subslice &OsStr.

§Safety

The slice MUST be a part of this HipOsStr.

Source

pub fn shrink_to_fit(&mut self)

Shrinks the capacity of the string as much as possible.

The capacity will remain at least as large as the actual length of the string.

No-op if the representation is not allocated.

§Representation stability

The allocated representation may change to inline if the required capacity is smaller than the inline capacity.

§Examples
let mut s = HipOsStr::with_capacity(100);
s.push("abc");
s.shrink_to_fit();
assert_eq!(s.capacity(), HipOsStr::inline_capacity());
Source

pub fn shrink_to(&mut self, min_capacity: usize)

Shrinks the capacity of the string with a lower bound.

The capacity will remain at least as large as the given lower bound and the actual length of the string.

No-op if the representation is not allocated.

§Representation stability

The allocated representation may change to inline if the required capacity is smaller than the inline capacity.

§Examples
let mut s = HipOsStr::with_capacity(100);
s.shrink_to(4);
assert_eq!(s.capacity(), HipOsStr::inline_capacity());
Source§

impl<B> HipOsStr<'static, B>
where B: Backend,

Source

pub const fn from_static(value: &'static str) -> Self

Creates a new HipOsStr from a 'static string slice without copying the slice.

§Representation

The created HipOsStr is borrowed.

§Examples

Basic usage:

let s = HipOsStr::from_static("hello");
assert_eq!(s.len(), 5);

Methods from Deref<Target = OsStr>§

1.0.0 · Source

pub fn to_str(&self) -> Option<&str>

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

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

§Examples
use std::ffi::OsStr;

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

pub fn to_string_lossy(&self) -> Cow<'_, str>

Converts an OsStr to a Cow<str>.

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

§Examples

Calling to_string_lossy on an OsStr with invalid unicode:

// Note, due to differences in how Unix and Windows represent strings,
// we are forced to complicate this example, setting up example `OsStr`s
// with different source data and via different platform extensions.
// Understand that in reality you could end up with such example invalid
// sequences simply through collecting user command line arguments, for
// example.

#[cfg(unix)] {
    use std::ffi::OsStr;
    use std::os::unix::ffi::OsStrExt;

    // Here, the values 0x66 and 0x6f correspond to 'f' and 'o'
    // respectively. The value 0x80 is a lone continuation byte, invalid
    // in a UTF-8 sequence.
    let source = [0x66, 0x6f, 0x80, 0x6f];
    let os_str = OsStr::from_bytes(&source[..]);

    assert_eq!(os_str.to_string_lossy(), "fo�o");
}
#[cfg(windows)] {
    use std::ffi::OsString;
    use std::os::windows::prelude::*;

    // Here the values 0x0066 and 0x006f correspond to 'f' and 'o'
    // respectively. The value 0xD800 is a lone surrogate half, invalid
    // in a UTF-16 sequence.
    let source = [0x0066, 0x006f, 0xD800, 0x006f];
    let os_string = OsString::from_wide(&source[..]);
    let os_str = os_string.as_os_str();

    assert_eq!(os_str.to_string_lossy(), "fo�o");
}
1.0.0 · Source

pub fn to_os_string(&self) -> OsString

Copies the slice into an owned OsString.

§Examples
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"));
1.9.0 · Source

pub fn is_empty(&self) -> bool

Checks whether the OsStr is empty.

§Examples
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());
1.9.0 · Source

pub fn len(&self) -> usize

Returns the length of this OsStr.

Note that this does not return the number of bytes in the string in OS string form.

The length returned is that of the underlying storage used by OsStr. As discussed in the OsString introduction, OsString and OsStr store strings in a form best suited for cheap inter-conversion between native-platform and Rust string forms, which may differ significantly from both of them, including in storage size and encoding.

This number is simply useful for passing to other methods, like OsString::with_capacity to avoid reallocations.

See the main OsString documentation information about encoding and capacity units.

§Examples
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);
1.74.0 · Source

pub fn as_encoded_bytes(&self) -> &[u8]

Converts an OS string slice to a byte slice. To convert the byte slice back into an OS string slice, use the OsStr::from_encoded_bytes_unchecked function.

The byte encoding is an unspecified, platform-specific, self-synchronizing superset of UTF-8. By being a self-synchronizing superset of UTF-8, this encoding is also a superset of 7-bit ASCII.

Note: As the encoding is unspecified, any sub-slice of bytes that is not valid UTF-8 should be treated as opaque and only comparable within the same Rust version built for the same target platform. For example, sending the slice over the network or storing it in a file will likely result in incompatible byte slices. See OsString for more encoding details and std::ffi for platform-specific, specified conversions.

Source

pub fn slice_encoded_bytes<R>(&self, range: R) -> &OsStr
where R: RangeBounds<usize>,

🔬This is a nightly-only experimental API. (os_str_slice)

Takes a substring based on a range that corresponds to the return value of OsStr::as_encoded_bytes.

The range’s start and end must lie on valid OsStr boundaries. A valid OsStr boundary is one of:

  • The start of the string
  • The end of the string
  • Immediately before a valid non-empty UTF-8 substring
  • Immediately after a valid non-empty UTF-8 substring
§Panics

Panics if range does not lie on valid OsStr boundaries or if it exceeds the end of the string.

§Example
#![feature(os_str_slice)]

use std::ffi::OsStr;

let os_str = OsStr::new("foo=bar");
let bytes = os_str.as_encoded_bytes();
if let Some(index) = bytes.iter().position(|b| *b == b'=') {
    let key = os_str.slice_encoded_bytes(..index);
    let value = os_str.slice_encoded_bytes(index + 1..);
    assert_eq!(key, "foo");
    assert_eq!(value, "bar");
}
1.53.0 · Source

pub fn to_ascii_lowercase(&self) -> OsString

Returns a copy of this string where each character is mapped to its ASCII lower case equivalent.

ASCII letters ‘A’ to ‘Z’ are mapped to ‘a’ to ‘z’, but non-ASCII letters are unchanged.

To lowercase the value in-place, use OsStr::make_ascii_lowercase.

§Examples
use std::ffi::OsString;
let s = OsString::from("Grüße, Jürgen ❤");

assert_eq!("grüße, jürgen ❤", s.to_ascii_lowercase());
1.53.0 · Source

pub fn to_ascii_uppercase(&self) -> OsString

Returns a copy of this string where each character is mapped to its ASCII upper case equivalent.

ASCII letters ‘a’ to ‘z’ are mapped to ‘A’ to ‘Z’, but non-ASCII letters are unchanged.

To uppercase the value in-place, use OsStr::make_ascii_uppercase.

§Examples
use std::ffi::OsString;
let s = OsString::from("Grüße, Jürgen ❤");

assert_eq!("GRüßE, JüRGEN ❤", s.to_ascii_uppercase());
1.53.0 · Source

pub fn is_ascii(&self) -> bool

Checks if all characters in this string are within the ASCII range.

§Examples
use std::ffi::OsString;

let ascii = OsString::from("hello!\n");
let non_ascii = OsString::from("Grüße, Jürgen ❤");

assert!(ascii.is_ascii());
assert!(!non_ascii.is_ascii());
1.53.0 · Source

pub fn eq_ignore_ascii_case<S>(&self, other: S) -> bool
where S: AsRef<OsStr>,

Checks that two strings are an ASCII case-insensitive match.

Same as to_ascii_lowercase(a) == to_ascii_lowercase(b), but without allocating and copying temporaries.

§Examples
use std::ffi::OsString;

assert!(OsString::from("Ferris").eq_ignore_ascii_case("FERRIS"));
assert!(OsString::from("Ferrös").eq_ignore_ascii_case("FERRöS"));
assert!(!OsString::from("Ferrös").eq_ignore_ascii_case("FERRÖS"));
1.87.0 · Source

pub fn display(&self) -> Display<'_>

Returns an object that implements Display for safely printing an OsStr that may contain non-Unicode data. This may perform lossy conversion, depending on the platform. If you would like an implementation which escapes the OsStr please use Debug instead.

§Examples
use std::ffi::OsStr;

let s = OsStr::new("Hello, world!");
println!("{}", s.display());

Trait Implementations§

Source§

impl<B> AsRef<OsStr> for HipOsStr<'_, B>
where B: Backend,

Source§

fn as_ref(&self) -> &OsStr

Converts this type into a shared reference of the (usually inferred) input type.
Source§

impl<B> AsRef<Path> for HipOsStr<'_, B>
where B: Backend,

Source§

fn as_ref(&self) -> &Path

Converts this type into a shared reference of the (usually inferred) input type.
Source§

impl<B> Borrow<OsStr> for HipOsStr<'_, B>
where B: Backend,

Source§

fn borrow(&self) -> &OsStr

Immutably borrows from an owned value. Read more
Source§

impl<B> Clone for HipOsStr<'_, B>
where B: Backend,

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 · Source§

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

Performs copy-assignment from source. Read more
Source§

impl<B> Debug for HipOsStr<'_, B>
where B: Backend,

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<B> Default for HipOsStr<'_, B>
where B: Backend,

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl<B> Deref for HipOsStr<'_, B>
where B: Backend,

Source§

type Target = OsStr

The resulting type after dereferencing.
Source§

fn deref(&self) -> &Self::Target

Dereferences the value.
Source§

impl<'de, B> Deserialize<'de> for HipOsStr<'_, B>
where B: Backend,

Available on crate feature serde and (Unix or Windows) only.
Source§

fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
where D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl<'borrow, B> From<&HipOsStr<'borrow, B>> for HipPath<'borrow, B>
where B: Backend,

Source§

fn from(value: &HipOsStr<'borrow, B>) -> Self

Converts to this type from the input type.
Source§

impl<'borrow, B> From<&HipPath<'borrow, B>> for HipOsStr<'borrow, B>
where B: Backend,

Source§

fn from(value: &HipPath<'borrow, B>) -> Self

Converts to this type from the input type.
Source§

impl<'borrow, B> From<&HipStr<'borrow, B>> for HipOsStr<'borrow, B>
where B: Backend,

Source§

fn from(value: &HipStr<'borrow, B>) -> Self

Converts to this type from the input type.
Source§

impl<B> From<&OsStr> for HipOsStr<'_, B>
where B: Backend,

Source§

fn from(value: &OsStr) -> Self

Converts to this type from the input type.
Source§

impl<B> From<&str> for HipOsStr<'_, B>
where B: Backend,

Source§

fn from(value: &str) -> Self

Converts to this type from the input type.
Source§

impl<B> From<Box<str>> for HipOsStr<'_, B>
where B: Backend,

Source§

fn from(value: Box<str>) -> Self

Converts to this type from the input type.
Source§

impl<'borrow, B> From<Cow<'borrow, str>> for HipOsStr<'borrow, B>
where B: Backend,

Source§

fn from(value: Cow<'borrow, str>) -> Self

Converts to this type from the input type.
Source§

impl<B> From<HipOsStr<'_, B>> for OsString
where B: Backend,

Source§

fn from(value: HipOsStr<'_, B>) -> Self

Converts to this type from the input type.
Source§

impl<B> From<HipOsStr<'_, B>> for Vec<u8>
where B: Backend,

Source§

fn from(value: HipOsStr<'_, B>) -> Self

Converts to this type from the input type.
Source§

impl<'borrow, B> From<HipOsStr<'borrow, B>> for Cow<'borrow, OsStr>
where B: Backend,

Source§

fn from(value: HipOsStr<'borrow, B>) -> Self

Converts to this type from the input type.
Source§

impl<'borrow, B> From<HipOsStr<'borrow, B>> for HipByt<'borrow, B>
where B: Backend,

Source§

fn from(value: HipOsStr<'borrow, B>) -> Self

Converts to this type from the input type.
Source§

impl<'borrow, B> From<HipOsStr<'borrow, B>> for HipPath<'borrow, B>
where B: Backend,

Source§

fn from(value: HipOsStr<'borrow, B>) -> Self

Converts to this type from the input type.
Source§

impl<'borrow, B> From<HipPath<'borrow, B>> for HipOsStr<'borrow, B>
where B: Backend,

Source§

fn from(value: HipPath<'borrow, B>) -> Self

Converts to this type from the input type.
Source§

impl<'borrow, B> From<HipStr<'borrow, B>> for HipOsStr<'borrow, B>
where B: Backend,

Source§

fn from(value: HipStr<'borrow, B>) -> Self

Converts to this type from the input type.
Source§

impl<B> From<OsString> for HipOsStr<'_, B>
where B: Backend,

Source§

fn from(value: OsString) -> Self

Converts to this type from the input type.
Source§

impl<B> From<String> for HipOsStr<'_, B>
where B: Backend,

Source§

fn from(value: String) -> Self

Converts to this type from the input type.
Source§

impl<B> Hash for HipOsStr<'_, B>
where B: Backend,

Source§

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

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

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

Feeds a slice of this type into the given Hasher. Read more
Source§

impl<B: Backend> Ord for HipOsStr<'_, B>

Source§

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

This method returns an Ordering between self and other. Read more
1.21.0 · Source§

fn max(self, other: Self) -> Self
where Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 · Source§

fn min(self, other: Self) -> Self
where Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 · Source§

fn clamp(self, min: Self, max: Self) -> Self
where Self: Sized,

Restrict a value to a certain interval. Read more
Source§

impl<B> PartialEq<&Box<OsStr>> for HipOsStr<'_, B>
where B: Backend,

Source§

fn eq(&self, other: &&Box<OsStr>) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

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

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl<B> PartialEq<&Box<Path>> for HipOsStr<'_, B>
where B: Backend,

Source§

fn eq(&self, other: &&Box<Path>) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

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

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl<B> PartialEq<&Cow<'_, OsStr>> for HipOsStr<'_, B>
where B: Backend,

Source§

fn eq(&self, other: &&Cow<'_, OsStr>) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

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

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl<B> PartialEq<&Cow<'_, Path>> for HipOsStr<'_, B>
where B: Backend,

Source§

fn eq(&self, other: &&Cow<'_, Path>) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

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

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl<B> PartialEq<&OsStr> for HipOsStr<'_, B>
where B: Backend,

Source§

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

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

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

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl<B> PartialEq<&OsString> for HipOsStr<'_, B>
where B: Backend,

Source§

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

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

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

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl<B> PartialEq<&Path> for HipOsStr<'_, B>
where B: Backend,

Source§

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

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

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

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl<B> PartialEq<&PathBuf> for HipOsStr<'_, B>
where B: Backend,

Source§

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

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

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

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl<B> PartialEq<Box<OsStr>> for HipOsStr<'_, B>
where B: Backend,

Source§

fn eq(&self, other: &Box<OsStr>) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

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

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl<B> PartialEq<Box<Path>> for HipOsStr<'_, B>
where B: Backend,

Source§

fn eq(&self, other: &Box<Path>) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

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

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl<B> PartialEq<Cow<'_, OsStr>> for HipOsStr<'_, B>
where B: Backend,

Source§

fn eq(&self, other: &Cow<'_, OsStr>) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

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

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl<B> PartialEq<Cow<'_, Path>> for HipOsStr<'_, B>
where B: Backend,

Source§

fn eq(&self, other: &Cow<'_, Path>) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

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

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl<B> PartialEq<HipOsStr<'_, B>> for &Box<OsStr>
where B: Backend,

Source§

fn eq(&self, other: &HipOsStr<'_, B>) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

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

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl<B> PartialEq<HipOsStr<'_, B>> for &Box<Path>
where B: Backend,

Source§

fn eq(&self, other: &HipOsStr<'_, B>) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

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

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl<B> PartialEq<HipOsStr<'_, B>> for &Cow<'_, OsStr>
where B: Backend,

Source§

fn eq(&self, other: &HipOsStr<'_, B>) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

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

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl<B> PartialEq<HipOsStr<'_, B>> for &Cow<'_, Path>
where B: Backend,

Source§

fn eq(&self, other: &HipOsStr<'_, B>) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

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

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl<B> PartialEq<HipOsStr<'_, B>> for &OsStr
where B: Backend,

Source§

fn eq(&self, other: &HipOsStr<'_, B>) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

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

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl<B> PartialEq<HipOsStr<'_, B>> for &OsString
where B: Backend,

Source§

fn eq(&self, other: &HipOsStr<'_, B>) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

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

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl<B> PartialEq<HipOsStr<'_, B>> for &Path
where B: Backend,

Source§

fn eq(&self, other: &HipOsStr<'_, B>) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

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

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl<B> PartialEq<HipOsStr<'_, B>> for &PathBuf
where B: Backend,

Source§

fn eq(&self, other: &HipOsStr<'_, B>) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

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

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl<B> PartialEq<HipOsStr<'_, B>> for Box<OsStr>
where B: Backend,

Source§

fn eq(&self, other: &HipOsStr<'_, B>) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

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

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl<B> PartialEq<HipOsStr<'_, B>> for Box<Path>
where B: Backend,

Source§

fn eq(&self, other: &HipOsStr<'_, B>) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

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

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl<B> PartialEq<HipOsStr<'_, B>> for Cow<'_, OsStr>
where B: Backend,

Source§

fn eq(&self, other: &HipOsStr<'_, B>) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

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

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl<B> PartialEq<HipOsStr<'_, B>> for Cow<'_, Path>
where B: Backend,

Source§

fn eq(&self, other: &HipOsStr<'_, B>) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

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

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl<B> PartialEq<HipOsStr<'_, B>> for OsStr
where B: Backend,

Source§

fn eq(&self, other: &HipOsStr<'_, B>) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

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

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl<B> PartialEq<HipOsStr<'_, B>> for OsString
where B: Backend,

Source§

fn eq(&self, other: &HipOsStr<'_, B>) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

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

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl<B> PartialEq<HipOsStr<'_, B>> for Path
where B: Backend,

Source§

fn eq(&self, other: &HipOsStr<'_, B>) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

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

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl<B> PartialEq<HipOsStr<'_, B>> for PathBuf
where B: Backend,

Source§

fn eq(&self, other: &HipOsStr<'_, B>) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

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

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl<B1, B2> PartialEq<HipOsStr<'_, B1>> for HipOsStr<'_, B2>
where B1: Backend, B2: Backend,

Source§

fn eq(&self, other: &HipOsStr<'_, B1>) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

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

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl<B1: Backend, B2: Backend> PartialEq<HipOsStr<'_, B2>> for HipPath<'_, B1>

Source§

fn eq(&self, other: &HipOsStr<'_, B2>) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

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

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl<B1: Backend, B2: Backend> PartialEq<HipPath<'_, B1>> for HipOsStr<'_, B2>

Source§

fn eq(&self, other: &HipPath<'_, B1>) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

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

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl<B> PartialEq<OsStr> for HipOsStr<'_, B>
where B: Backend,

Source§

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

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

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

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl<B> PartialEq<OsString> for HipOsStr<'_, B>
where B: Backend,

Source§

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

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

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

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl<B> PartialEq<Path> for HipOsStr<'_, B>
where B: Backend,

Source§

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

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

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

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl<B> PartialEq<PathBuf> for HipOsStr<'_, B>
where B: Backend,

Source§

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

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

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

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl<B> PartialOrd<&Box<OsStr>> for HipOsStr<'_, B>
where B: Backend,

Source§

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

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

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

Tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · Source§

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

Tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 · Source§

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

Tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · Source§

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

Tests greater than or equal to (for self and other) and is used by the >= operator. Read more
Source§

impl<B> PartialOrd<&Box<Path>> for HipOsStr<'_, B>
where B: Backend,

Source§

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

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

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

Tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · Source§

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

Tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 · Source§

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

Tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · Source§

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

Tests greater than or equal to (for self and other) and is used by the >= operator. Read more
Source§

impl<B> PartialOrd<&Cow<'_, OsStr>> for HipOsStr<'_, B>
where B: Backend,

Source§

fn partial_cmp(&self, other: &&Cow<'_, OsStr>) -> Option<Ordering>

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

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

Tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · Source§

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

Tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 · Source§

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

Tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · Source§

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

Tests greater than or equal to (for self and other) and is used by the >= operator. Read more
Source§

impl<B> PartialOrd<&Cow<'_, Path>> for HipOsStr<'_, B>
where B: Backend,

Source§

fn partial_cmp(&self, other: &&Cow<'_, Path>) -> Option<Ordering>

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

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

Tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · Source§

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

Tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 · Source§

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

Tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · Source§

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

Tests greater than or equal to (for self and other) and is used by the >= operator. Read more
Source§

impl<B> PartialOrd<&OsStr> for HipOsStr<'_, B>
where B: Backend,

Source§

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

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

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

Tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · Source§

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

Tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 · Source§

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

Tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · Source§

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

Tests greater than or equal to (for self and other) and is used by the >= operator. Read more
Source§

impl<B> PartialOrd<&OsString> for HipOsStr<'_, B>
where B: Backend,

Source§

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

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

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

Tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · Source§

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

Tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 · Source§

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

Tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · Source§

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

Tests greater than or equal to (for self and other) and is used by the >= operator. Read more
Source§

impl<B> PartialOrd<&Path> for HipOsStr<'_, B>
where B: Backend,

Source§

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

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

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

Tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · Source§

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

Tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 · Source§

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

Tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · Source§

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

Tests greater than or equal to (for self and other) and is used by the >= operator. Read more
Source§

impl<B> PartialOrd<&PathBuf> for HipOsStr<'_, B>
where B: Backend,

Source§

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

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

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

Tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · Source§

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

Tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 · Source§

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

Tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · Source§

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

Tests greater than or equal to (for self and other) and is used by the >= operator. Read more
Source§

impl<B> PartialOrd<Box<OsStr>> for HipOsStr<'_, B>
where B: Backend,

Source§

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

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

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

Tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · Source§

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

Tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 · Source§

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

Tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · Source§

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

Tests greater than or equal to (for self and other) and is used by the >= operator. Read more
Source§

impl<B> PartialOrd<Box<Path>> for HipOsStr<'_, B>
where B: Backend,

Source§

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

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

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

Tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · Source§

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

Tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 · Source§

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

Tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · Source§

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

Tests greater than or equal to (for self and other) and is used by the >= operator. Read more
Source§

impl<B> PartialOrd<Cow<'_, OsStr>> for HipOsStr<'_, B>
where B: Backend,

Source§

fn partial_cmp(&self, other: &Cow<'_, OsStr>) -> Option<Ordering>

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

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

Tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · Source§

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

Tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 · Source§

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

Tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · Source§

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

Tests greater than or equal to (for self and other) and is used by the >= operator. Read more
Source§

impl<B> PartialOrd<Cow<'_, Path>> for HipOsStr<'_, B>
where B: Backend,

Source§

fn partial_cmp(&self, other: &Cow<'_, Path>) -> Option<Ordering>

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

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

Tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · Source§

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

Tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 · Source§

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

Tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · Source§

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

Tests greater than or equal to (for self and other) and is used by the >= operator. Read more
Source§

impl<B> PartialOrd<HipOsStr<'_, B>> for &Box<OsStr>
where B: Backend,

Source§

fn partial_cmp(&self, other: &HipOsStr<'_, B>) -> Option<Ordering>

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

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

Tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · Source§

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

Tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 · Source§

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

Tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · Source§

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

Tests greater than or equal to (for self and other) and is used by the >= operator. Read more
Source§

impl<B> PartialOrd<HipOsStr<'_, B>> for &Box<Path>
where B: Backend,

Source§

fn partial_cmp(&self, other: &HipOsStr<'_, B>) -> Option<Ordering>

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

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

Tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · Source§

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

Tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 · Source§

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

Tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · Source§

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

Tests greater than or equal to (for self and other) and is used by the >= operator. Read more
Source§

impl<B> PartialOrd<HipOsStr<'_, B>> for &Cow<'_, OsStr>
where B: Backend,

Source§

fn partial_cmp(&self, other: &HipOsStr<'_, B>) -> Option<Ordering>

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

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

Tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · Source§

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

Tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 · Source§

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

Tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · Source§

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

Tests greater than or equal to (for self and other) and is used by the >= operator. Read more
Source§

impl<B> PartialOrd<HipOsStr<'_, B>> for &Cow<'_, Path>
where B: Backend,

Source§

fn partial_cmp(&self, other: &HipOsStr<'_, B>) -> Option<Ordering>

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

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

Tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · Source§

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

Tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 · Source§

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

Tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · Source§

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

Tests greater than or equal to (for self and other) and is used by the >= operator. Read more
Source§

impl<B> PartialOrd<HipOsStr<'_, B>> for &OsStr
where B: Backend,

Source§

fn partial_cmp(&self, other: &HipOsStr<'_, B>) -> Option<Ordering>

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

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

Tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · Source§

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

Tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 · Source§

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

Tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · Source§

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

Tests greater than or equal to (for self and other) and is used by the >= operator. Read more
Source§

impl<B> PartialOrd<HipOsStr<'_, B>> for &OsString
where B: Backend,

Source§

fn partial_cmp(&self, other: &HipOsStr<'_, B>) -> Option<Ordering>

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

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

Tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · Source§

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

Tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 · Source§

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

Tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · Source§

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

Tests greater than or equal to (for self and other) and is used by the >= operator. Read more
Source§

impl<B> PartialOrd<HipOsStr<'_, B>> for &Path
where B: Backend,

Source§

fn partial_cmp(&self, other: &HipOsStr<'_, B>) -> Option<Ordering>

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

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

Tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · Source§

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

Tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 · Source§

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

Tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · Source§

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

Tests greater than or equal to (for self and other) and is used by the >= operator. Read more
Source§

impl<B> PartialOrd<HipOsStr<'_, B>> for &PathBuf
where B: Backend,

Source§

fn partial_cmp(&self, other: &HipOsStr<'_, B>) -> Option<Ordering>

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

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

Tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · Source§

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

Tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 · Source§

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

Tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · Source§

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

Tests greater than or equal to (for self and other) and is used by the >= operator. Read more
Source§

impl<B> PartialOrd<HipOsStr<'_, B>> for Box<OsStr>
where B: Backend,

Source§

fn partial_cmp(&self, other: &HipOsStr<'_, B>) -> Option<Ordering>

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

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

Tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · Source§

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

Tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 · Source§

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

Tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · Source§

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

Tests greater than or equal to (for self and other) and is used by the >= operator. Read more
Source§

impl<B> PartialOrd<HipOsStr<'_, B>> for Box<Path>
where B: Backend,

Source§

fn partial_cmp(&self, other: &HipOsStr<'_, B>) -> Option<Ordering>

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

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

Tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · Source§

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

Tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 · Source§

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

Tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · Source§

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

Tests greater than or equal to (for self and other) and is used by the >= operator. Read more
Source§

impl<B> PartialOrd<HipOsStr<'_, B>> for Cow<'_, OsStr>
where B: Backend,

Source§

fn partial_cmp(&self, other: &HipOsStr<'_, B>) -> Option<Ordering>

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

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

Tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · Source§

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

Tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 · Source§

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

Tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · Source§

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

Tests greater than or equal to (for self and other) and is used by the >= operator. Read more
Source§

impl<B> PartialOrd<HipOsStr<'_, B>> for Cow<'_, Path>
where B: Backend,

Source§

fn partial_cmp(&self, other: &HipOsStr<'_, B>) -> Option<Ordering>

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

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

Tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · Source§

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

Tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 · Source§

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

Tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · Source§

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

Tests greater than or equal to (for self and other) and is used by the >= operator. Read more
Source§

impl<B> PartialOrd<HipOsStr<'_, B>> for OsStr
where B: Backend,

Source§

fn partial_cmp(&self, other: &HipOsStr<'_, B>) -> Option<Ordering>

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

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

Tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · Source§

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

Tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 · Source§

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

Tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · Source§

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

Tests greater than or equal to (for self and other) and is used by the >= operator. Read more
Source§

impl<B> PartialOrd<HipOsStr<'_, B>> for OsString
where B: Backend,

Source§

fn partial_cmp(&self, other: &HipOsStr<'_, B>) -> Option<Ordering>

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

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

Tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · Source§

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

Tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 · Source§

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

Tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · Source§

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

Tests greater than or equal to (for self and other) and is used by the >= operator. Read more
Source§

impl<B> PartialOrd<HipOsStr<'_, B>> for Path
where B: Backend,

Source§

fn partial_cmp(&self, other: &HipOsStr<'_, B>) -> Option<Ordering>

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

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

Tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · Source§

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

Tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 · Source§

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

Tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · Source§

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

Tests greater than or equal to (for self and other) and is used by the >= operator. Read more
Source§

impl<B> PartialOrd<HipOsStr<'_, B>> for PathBuf
where B: Backend,

Source§

fn partial_cmp(&self, other: &HipOsStr<'_, B>) -> Option<Ordering>

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

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

Tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · Source§

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

Tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 · Source§

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

Tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · Source§

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

Tests greater than or equal to (for self and other) and is used by the >= operator. Read more
Source§

impl<B1, B2> PartialOrd<HipOsStr<'_, B1>> for HipOsStr<'_, B2>
where B1: Backend, B2: Backend,

Source§

fn partial_cmp(&self, other: &HipOsStr<'_, B1>) -> Option<Ordering>

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

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

Tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · Source§

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

Tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 · Source§

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

Tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · Source§

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

Tests greater than or equal to (for self and other) and is used by the >= operator. Read more
Source§

impl<B1: Backend, B2: Backend> PartialOrd<HipOsStr<'_, B2>> for HipPath<'_, B1>

Source§

fn partial_cmp(&self, other: &HipOsStr<'_, B2>) -> Option<Ordering>

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

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

Tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · Source§

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

Tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 · Source§

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

Tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · Source§

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

Tests greater than or equal to (for self and other) and is used by the >= operator. Read more
Source§

impl<B1: Backend, B2: Backend> PartialOrd<HipPath<'_, B1>> for HipOsStr<'_, B2>

Source§

fn partial_cmp(&self, other: &HipPath<'_, B1>) -> Option<Ordering>

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

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

Tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · Source§

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

Tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 · Source§

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

Tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · Source§

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

Tests greater than or equal to (for self and other) and is used by the >= operator. Read more
Source§

impl<B> PartialOrd<OsStr> for HipOsStr<'_, B>
where B: Backend,

Source§

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

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

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

Tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · Source§

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

Tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 · Source§

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

Tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · Source§

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

Tests greater than or equal to (for self and other) and is used by the >= operator. Read more
Source§

impl<B> PartialOrd<OsString> for HipOsStr<'_, B>
where B: Backend,

Source§

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

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

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

Tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · Source§

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

Tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 · Source§

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

Tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · Source§

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

Tests greater than or equal to (for self and other) and is used by the >= operator. Read more
Source§

impl<B> PartialOrd<Path> for HipOsStr<'_, B>
where B: Backend,

Source§

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

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

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

Tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · Source§

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

Tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 · Source§

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

Tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · Source§

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

Tests greater than or equal to (for self and other) and is used by the >= operator. Read more
Source§

impl<B> PartialOrd<PathBuf> for HipOsStr<'_, B>
where B: Backend,

Source§

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

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

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

Tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · Source§

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

Tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 · Source§

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

Tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · Source§

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

Tests greater than or equal to (for self and other) and is used by the >= operator. Read more
Source§

impl<B> Serialize for HipOsStr<'_, B>
where B: Backend,

Available on crate feature serde and (Unix or Windows) only.
Source§

fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
where S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl<B> Eq for HipOsStr<'_, B>
where B: Backend,

Auto Trait Implementations§

§

impl<'borrow, B> Freeze for HipOsStr<'borrow, B>

§

impl<'borrow, B> RefUnwindSafe for HipOsStr<'borrow, B>
where B: RefUnwindSafe,

§

impl<'borrow, B> Send for HipOsStr<'borrow, B>
where B: Send,

§

impl<'borrow, B> Sync for HipOsStr<'borrow, B>
where B: Sync,

§

impl<'borrow, B> Unpin for HipOsStr<'borrow, B>

§

impl<'borrow, B> UnwindSafe for HipOsStr<'borrow, B>
where B: RefUnwindSafe,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<P, T> Receiver for P
where P: Deref<Target = T> + ?Sized, T: ?Sized,

Source§

type Target = T

🔬This is a nightly-only experimental API. (arbitrary_self_types)
The target type on which the method may be called.
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,