Struct OwnedPath

Source
pub struct OwnedPath<State: PathState> { /* private fields */ }
Available on Linux only.

Implementations§

Source§

impl OwnedPath<Abs>

Source§

impl<S: PathState> OwnedPath<S>

Source

pub const unsafe fn from_unchecked(inner: OsString) -> Self

Source

pub fn as_path(&self) -> &Path<S>

Source

pub fn push<P: AsRef<Path<Rel>>>(&mut self, other: P)

Source§

impl OwnedPath<Rel>

Methods from Deref<Target = Path<S>>§

Source

pub fn display<'a>(&'a self) -> DisplayPath<'a, S>

Source

pub fn len(&self) -> usize

Source

pub fn is_empty(&self) -> bool

Source

pub fn as_os_str(&self) -> &OsStr

Source

pub fn as_os_str_no_lead(&self) -> &OsStr

Source

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

Source

pub fn join<P: AsRef<Path<Rel>>>(&self, other: P) -> OwnedPath<S>

Source

pub fn relative(&self, other: &Self) -> Option<&Path<Rel>>

Source

pub fn components<'a>(&'a self) -> Components<'a, S>

Source

pub fn ancestors<'a>(&'a self) -> Ancestors<'a, S>

Trait Implementations§

Source§

impl<S: PathState> AsRef<Path<S>> for OwnedPath<S>

Source§

fn as_ref(&self) -> &Path<S>

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

impl<S: PathState> Borrow<Path<S>> for OwnedPath<S>

Source§

fn borrow(&self) -> &Path<S>

Immutably borrows from an owned value. Read more
Source§

impl<State: Clone + PathState> Clone for OwnedPath<State>

Source§

fn clone(&self) -> OwnedPath<State>

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<S: PathState> Debug for OwnedPath<S>

Source§

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

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

impl<S: PathState> Deref for OwnedPath<S>

Source§

type Target = Path<S>

The resulting type after dereferencing.
Source§

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

Dereferences the value.
Source§

impl<O: AsRef<OsStr>> From<O> for OwnedPath<Abs>

Source§

fn from(value: O) -> Self

Converts to this type from the input type.
Source§

impl<O: AsRef<OsStr>> From<O> for OwnedPath<Rel>

Source§

fn from(value: O) -> Self

Converts to this type from the input type.
Source§

impl<S: PathState> From<OwnedPath<S>> for CString

Source§

fn from(value: OwnedPath<S>) -> Self

Converts to this type from the input type.
Source§

impl<S: PathState> Ord for OwnedPath<S>

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<S: PathState> PartialEq<OwnedPath<S>> for Path<S>

Source§

fn eq(&self, other: &OwnedPath<S>) -> 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<S: PathState> PartialEq<Path<S>> for OwnedPath<S>

Source§

fn eq(&self, other: &Path<S>) -> 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<S: PathState> PartialEq for OwnedPath<S>

Source§

fn eq(&self, other: &Self) -> 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<S: PathState> PartialOrd<OwnedPath<S>> for Path<S>

Source§

fn partial_cmp(&self, other: &OwnedPath<S>) -> 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<S: PathState> PartialOrd<Path<S>> for OwnedPath<S>

Source§

fn partial_cmp(&self, other: &Path<S>) -> 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<S: PathState> PartialOrd for OwnedPath<S>

Source§

fn partial_cmp(&self, other: &Self) -> 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<S: PathState> Eq for OwnedPath<S>

Auto Trait Implementations§

§

impl<State> Freeze for OwnedPath<State>

§

impl<State> RefUnwindSafe for OwnedPath<State>

§

impl<State> Send for OwnedPath<State>

§

impl<State> Sync for OwnedPath<State>

§

impl<State> Unpin for OwnedPath<State>

§

impl<State> UnwindSafe for OwnedPath<State>

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.