Struct ra_ap_paths::AbsPath[][src]

#[repr(transparent)]
pub struct AbsPath(_);
Expand description

Wrapper around an absolute Path.

Implementations

Wrap the given absolute path in AbsPath

Panics

Panics if path is not absolute.

Equivalent of Path::parent for AbsPath.

Equivalent of Path::join for AbsPath.

Normalize the given path:

  • Removes repeated separators: /a//b becomes /a/b
  • Removes occurrences of . and resolves ...
  • Removes trailing slashes: /a/b/ becomes /a/b.
Example
let abs_path_buf = AbsPathBuf::assert("/a/../../b/.//c//".into());
let normalized = abs_path_buf.normalize();
assert_eq!(normalized, AbsPathBuf::assert("/b/c".into()));

Equivalent of Path::to_path_buf for AbsPath.

Equivalent of Path::strip_prefix for AbsPath.

Returns a relative path.

👎 Deprecated:

use std::fs::metadata().is_ok() instead

Trait Implementations

Performs the conversion.

Performs the conversion.

Immutably borrows from an owned value. Read more

Formats the value using the given formatter. Read more

Feeds this value into the given Hasher. Read more

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

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

Compares and returns the maximum of two values. Read more

Compares and returns the minimum of two values. Read more

Restrict a value to a certain interval. Read more

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

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

This method tests less than (for self and other) and is used by the < operator. Read more

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more

This method tests greater than (for self and other) and is used by the > operator. Read more

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more

The type returned in the event of a conversion error.

Performs the conversion.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more