paths

Struct RelPath

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

Wrapper around a relative Utf8Path.

Implementations§

Source§

impl RelPath

Source

pub fn new_unchecked(path: &Utf8Path) -> &RelPath

Creates a new RelPath from path, without checking if it is relative.

Source

pub fn to_path_buf(&self) -> RelPathBuf

Equivalent of Utf8Path::to_path_buf for RelPath.

Source

pub fn as_utf8_path(&self) -> &Utf8Path

Source

pub fn as_str(&self) -> &str

Trait Implementations§

Source§

impl AsRef<Path> for RelPath

Source§

fn as_ref(&self) -> &Path

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

impl AsRef<Utf8Path> for RelPath

Source§

fn as_ref(&self) -> &Utf8Path

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

impl Debug for RelPath

Source§

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

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

impl Hash for RelPath

Source§

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

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

impl Ord for RelPath

Source§

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

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

impl PartialEq for RelPath

Source§

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

Source§

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

Source§

impl StructuralPartialEq for RelPath

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