Skip to main content

AbsPath

Struct AbsPath 

Source
pub struct AbsPath(/* private fields */);

Implementations§

Source§

impl AbsPath

Source

pub fn new(path: &Path) -> Result<&Self>

Source

pub fn to_abs_path_buf(&self) -> AbsPathBuf

Source

pub fn join(&self, name: impl AsRef<str>) -> AbsPathBuf

Source

pub fn join_rel_path(&self, relative_path: &RelPath) -> AbsPathBuf

Source

pub fn parent(&self) -> Option<&AbsPath>

Source

pub fn starts_with(&self, other: &AbsPath) -> bool

Source

pub fn ends_with(&self, other: &RelPath) -> bool

Source

pub fn is_descendant_of(&self, ancestor: &Self) -> bool

Source

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

Source

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

Source

pub fn as_std_path(&self) -> &Path

Source

pub fn as_str(&self) -> &str

Source

pub fn ancestors(&self) -> impl Iterator<Item = &AbsPath>

Source

pub fn strip_prefix<'a>(&'a self, prefix: &AbsPath) -> Option<Cow<'a, RelPath>>

Trait Implementations§

Source§

impl AsRef<AbsPath> for AbsPath

Source§

fn as_ref(&self) -> &AbsPath

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

impl AsRef<AbsPath> for AbsPathBuf

Source§

fn as_ref(&self) -> &AbsPath

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

impl AsRef<Path> for AbsPath

Source§

fn as_ref(&self) -> &Path

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

impl Borrow<AbsPath> for AbsPathBuf

Source§

fn borrow(&self) -> &AbsPath

Immutably borrows from an owned value. Read more
Source§

impl Debug for AbsPath

Source§

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

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

impl Eq for AbsPath

Source§

impl From<&AbsPath> for Arc<AbsPath>

Source§

fn from(path: &AbsPath) -> Self

Converts to this type from the input type.
Source§

impl From<&AbsPath> for Rc<AbsPath>

Source§

fn from(path: &AbsPath) -> Self

Converts to this type from the input type.
Source§

impl Hash for AbsPath

Source§

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

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

impl Ord for AbsPath

Source§

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

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

impl PartialEq for AbsPath

Source§

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

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

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

Inequality operator !=. Read more
Source§

impl PartialEq<AbsPath> for AbsPathBuf

Source§

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

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

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

Inequality operator !=. Read more
Source§

impl PartialEq<AbsPathBuf> for AbsPath

Source§

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

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

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

Inequality operator !=. Read more
Source§

impl PartialOrd for AbsPath

Source§

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

This method returns an ordering between self and other values if one exists. Read more
1.0.0 (const: unstable) · 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 (const: unstable) · 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 (const: unstable) · 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 (const: unstable) · 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 StructuralPartialEq for AbsPath

Source§

impl ToOwned for AbsPath

Source§

type Owned = AbsPathBuf

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

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> PathExt for T
where T: AsRef<Path> + ?Sized,