Skip to main content

RelativePath

Struct RelativePath 

Source
pub struct RelativePath(/* private fields */);
Expand description

Relative Path.

Trait Implementations§

Source§

impl AsRef<RelativePath> for Path

Source§

fn as_ref(&self) -> &RelativePath

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

impl AsRef<RelativePath> for RelativePathOwned

Source§

fn as_ref(&self) -> &RelativePath

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

impl AsRef<RelativePath> for str

Source§

fn as_ref(&self) -> &RelativePath

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

impl AsRef<str> for RelativePath

Source§

fn as_ref(&self) -> &str

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

impl Borrow<RelativePath> for RelativePathOwned

Source§

fn borrow(&self) -> &RelativePath

Immutably borrows from an owned value. Read more
Source§

impl Debug for RelativePath

Source§

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

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

impl Display for RelativePath

Source§

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

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

impl From<&RelativePath> for PathOwned

Source§

fn from(value: &RelativePath) -> Self

Converts to this type from the input type.
Source§

impl From<&RelativePath> for RelativePathOwned

Source§

fn from(val: &RelativePath) -> Self

Converts to this type from the input type.
Source§

impl From<&RelativePath> for String

Source§

fn from(val: &RelativePath) -> Self

Converts to this type from the input type.
Source§

impl<'a> IntoIterator for &'a RelativePath

Source§

type Item = Component<'a>

The type of the elements being iterated over.
Source§

type IntoIter = Components<'a>

Which kind of iterator are we turning this into?
Source§

fn into_iter(self) -> Self::IntoIter

Creates an iterator from a value. Read more
Source§

impl Ord for RelativePath

Source§

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

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

impl PartialEq<RelativePath> for Path

Source§

fn eq(&self, other: &RelativePath) -> 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 PartialEq<RelativePath> for RelativePathOwned

Source§

fn eq(&self, other: &RelativePath) -> 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 PartialEq<RelativePathOwned> for RelativePath

Source§

fn eq(&self, other: &RelativePathOwned) -> 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 PartialEq<str> for RelativePath

Source§

fn eq(&self, other: &str) -> 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 PartialEq for RelativePath

Source§

fn eq(&self, other: &RelativePath) -> 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 PartialOrd for RelativePath

Source§

fn partial_cmp(&self, other: &RelativePath) -> 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 PathExt for RelativePath

Source§

fn from_str_unchecked(s: &str) -> &Self::Path

Source§

type PathOwned = RelativePathOwned

Source§

type Path = RelativePath

Source§

fn validate(buf: &str) -> Result<(), PathError>

Source§

fn from_owned_unchecked(buf: String) -> Self::PathOwned

Source§

fn as_str(&self) -> &str

Source§

fn has_root(&self) -> bool

Source§

fn from_owned(buf: String) -> Result<Self::PathOwned, PathError>

Source§

fn from_str(buf: &str) -> Result<&Self::Path, PathError>

Source§

fn as_path(&self) -> &Self::Path

Source§

fn to_path(&self) -> Self::PathOwned

Source§

fn components(&self) -> Components<'_>

Path components.
Source§

fn parent(&self) -> Option<&Self::Path>

Parent directory.
Source§

fn parent_result(&self) -> Result<&Self::Path, PathError>

Parent directory.
Source§

fn parents(&self) -> impl Iterator<Item = &Self::Path>

Parent directories as full path starting at root. Read more
Source§

fn paths(&self) -> impl Iterator<Item = &Self::Path>

Components as full path starting at root. Read more
Source§

fn parent_and_file_name(&self) -> Option<(&Self::Path, &str)>

Path and filename.
Source§

fn parent_and_file_name_result(&self) -> Result<(&Self::Path, &str), PathError>

Path and filename.
Source§

fn file_name(&self) -> Option<&str>

File name.
Source§

fn file_name_result(&self) -> Result<&str, PathError>

File name.
Source§

fn normalize(&self) -> Result<Self::PathOwned, PathError>

Normalize path to connonized form.
Source§

fn join<'a: 'b, 'b>( &'a self, other: impl IntoIterator<Item = Component<'b>>, ) -> Result<Self::PathOwned, PathError>

Join and normalize components into an path.
Source§

fn join_path(&self, other: &str) -> Result<Self::PathOwned, PathError>

Join and normalize other path.
Source§

impl ToOwned for RelativePath

Source§

type Owned = RelativePathOwned

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> Self::Owned

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

fn clone_into(&self, target: &mut Self::Owned)

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

impl Eq for RelativePath

Source§

impl StructuralPartialEq for RelativePath

Auto Trait Implementations§

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> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more