nu_path

Type Alias AbsolutePath

Source
pub type AbsolutePath = Path<Absolute>;
Expand description

A path that is strictly absolute.

I.e., this path is guaranteed to never be relative.

§Examples

AbsolutePaths can be created by using try_absolute on a Path or by using try_new.

use nu_path::{AbsolutePath, Path};

let path1 = Path::new("/foo").try_absolute().unwrap();
let path2 = AbsolutePath::try_new("/foo").unwrap();

assert_eq!(path1, path2);

You can also use AbsolutePath::try_from or try_into. This supports attempted conversions from Path as well as types in std::path.

use nu_path::{AbsolutePath, Path};

let path1 = Path::new("/foo");
let path1: &AbsolutePath = path1.try_into().unwrap();

let path2 = std::path::Path::new("/foo");
let path2: &AbsolutePath = path2.try_into().unwrap();

assert_eq!(path1, path2)

Aliased Type§

struct AbsolutePath { /* private fields */ }

Implementations§

Source§

impl AbsolutePath

Source

pub fn canonicalize(&self) -> Result<CanonicalPathBuf>

Returns the canonical, absolute form of the path with all intermediate components normalized and symbolic links resolved.

On Windows, this will also simplify to a winuser path.

This is an alias to std::fs::canonicalize.

§Examples
use nu_path::{AbsolutePath, PathBuf};

let path = AbsolutePath::try_new("/foo/test/../test/bar.rs").unwrap();
assert_eq!(path.canonicalize().unwrap(), PathBuf::from("/foo/test/bar.rs"));

Reads a symbolic link, returning the file that the link points to.

This is an alias to std::fs::read_link.

§Examples
use nu_path::AbsolutePath;

let path = AbsolutePath::try_new("/laputa/sky_castle.rs").unwrap();
let path_link = path.read_link().expect("read_link call failed");
Source

pub fn try_exists(&self) -> Result<bool>

Returns Ok(true) if the path points at an existing entity.

This function will traverse symbolic links to query information about the destination file. In case of broken symbolic links this will return Ok(false).

Path::exists only checks whether or not a path was both found and readable. By contrast, try_exists will return Ok(true) or Ok(false), respectively, if the path was verified to exist or not exist. If its existence can neither be confirmed nor denied, it will propagate an Err instead. This can be the case if e.g. listing permission is denied on one of the parent directories.

Note that while this avoids some pitfalls of the exists method, it still can not prevent time-of-check to time-of-use (TOCTOU) bugs. You should only use it in scenarios where those bugs are not an issue.

§Examples
use nu_path::AbsolutePath;

let path = AbsolutePath::try_new("/does_not_exist").unwrap();
assert!(!path.try_exists().unwrap());

let path = AbsolutePath::try_new("/root/secret_file.txt").unwrap();
assert!(path.try_exists().is_err());

Returns true if the path exists on disk and is pointing at a symbolic link.

This function will not traverse symbolic links. In case of a broken symbolic link this will also return true.

If you cannot access the directory containing the file, e.g., because of a permission error, this will return false.

§Examples
use nu_path::AbsolutePath;
use std::os::unix::fs::symlink;

let link_path = AbsolutePath::try_new("/link").unwrap();
symlink("/origin_does_not_exist/", link_path).unwrap();
assert_eq!(link_path.is_symlink(), true);
assert_eq!(link_path.exists(), false);

Queries the metadata about a file without following symlinks.

This is an alias to std::fs::symlink_metadata.

§Examples
use nu_path::AbsolutePath;

let path = AbsolutePath::try_new("/Minas/tirith").unwrap();
let metadata = path.symlink_metadata().expect("symlink_metadata call failed");
println!("{:?}", metadata.file_type());

Trait Implementations§

Source§

impl AsRef<Path> for Box<AbsolutePath>

Source§

fn as_ref(&self) -> &Path

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

impl From<Box<Path<Canonical>>> for Box<AbsolutePath>

Source§

fn from(path: Box<CanonicalPath>) -> Self

Converts to this type from the input type.
Source§

impl From<Cow<'_, Path<Canonical>>> for Box<AbsolutePath>

Source§

fn from(cow: Cow<'_, CanonicalPath>) -> Self

Converts to this type from the input type.
Source§

impl From<PathBuf<Canonical>> for Box<AbsolutePath>

Source§

fn from(buf: CanonicalPathBuf) -> Self

Converts to this type from the input type.
Source§

impl<'a> PartialEq<&'a Path<Canonical>> for AbsolutePath

Source§

fn eq(&self, other: &&'a CanonicalPath) -> 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<'a> PartialEq<&'a Path> for AbsolutePath

Source§

fn eq(&self, other: &&'a Path) -> 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<'a, 'b> PartialEq<Cow<'a, Path<Canonical>>> for &'b AbsolutePath

Source§

fn eq(&self, other: &Cow<'a, CanonicalPath>) -> 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<'a> PartialEq<Cow<'a, Path<Canonical>>> for AbsolutePath

Source§

fn eq(&self, other: &Cow<'a, CanonicalPath>) -> 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<'a, 'b> PartialEq<Cow<'a, Path>> for &'b AbsolutePath

Source§

fn eq(&self, other: &Cow<'a, Path>) -> 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<'a> PartialEq<Cow<'a, Path>> for AbsolutePath

Source§

fn eq(&self, other: &Cow<'a, Path>) -> 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<'a> PartialEq<Path<Canonical>> for &'a AbsolutePath

Source§

fn eq(&self, other: &CanonicalPath) -> 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<Path<Canonical>> for AbsolutePath

Source§

fn eq(&self, other: &CanonicalPath) -> 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<'a> PartialEq<Path> for &'a AbsolutePath

Source§

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

Source§

fn eq(&self, other: &Path) -> 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<'a> PartialEq<PathBuf<Canonical>> for &'a AbsolutePath

Source§

fn eq(&self, other: &CanonicalPathBuf) -> 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<PathBuf<Canonical>> for AbsolutePath

Source§

fn eq(&self, other: &CanonicalPathBuf) -> 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<'a> PartialEq<PathBuf> for &'a AbsolutePath

Source§

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

Source§

fn eq(&self, other: &PathBuf) -> 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<'a> PartialOrd<&'a Path<Canonical>> for AbsolutePath

Source§

fn partial_cmp(&self, other: &&'a CanonicalPath) -> 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<'a> PartialOrd<&'a Path> for AbsolutePath

Source§

fn partial_cmp(&self, other: &&'a Path) -> 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<'a, 'b> PartialOrd<Cow<'a, Path<Canonical>>> for &'b AbsolutePath

Source§

fn partial_cmp(&self, other: &Cow<'a, CanonicalPath>) -> 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<'a> PartialOrd<Cow<'a, Path<Canonical>>> for AbsolutePath

Source§

fn partial_cmp(&self, other: &Cow<'a, CanonicalPath>) -> 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<'a, 'b> PartialOrd<Cow<'a, Path>> for &'b AbsolutePath

Source§

fn partial_cmp(&self, other: &Cow<'a, Path>) -> 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<'a> PartialOrd<Cow<'a, Path>> for AbsolutePath

Source§

fn partial_cmp(&self, other: &Cow<'a, Path>) -> 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<'a> PartialOrd<Path<Canonical>> for &'a AbsolutePath

Source§

fn partial_cmp(&self, other: &CanonicalPath) -> 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 PartialOrd<Path<Canonical>> for AbsolutePath

Source§

fn partial_cmp(&self, other: &CanonicalPath) -> 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<'a> PartialOrd<Path> for &'a AbsolutePath

Source§

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

Source§

fn partial_cmp(&self, other: &Path) -> 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<'a> PartialOrd<PathBuf<Canonical>> for &'a AbsolutePath

Source§

fn partial_cmp(&self, other: &CanonicalPathBuf) -> 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 PartialOrd<PathBuf<Canonical>> for AbsolutePath

Source§

fn partial_cmp(&self, other: &CanonicalPathBuf) -> 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<'a> PartialOrd<PathBuf> for &'a AbsolutePath

Source§

fn partial_cmp(&self, other: &PathBuf) -> 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 PartialOrd<PathBuf> for AbsolutePath

Source§

fn partial_cmp(&self, other: &PathBuf) -> 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<'a> TryFrom<&'a Component<'_>> for &'a AbsolutePath

Source§

type Error = TryAbsoluteError

The type returned in the event of a conversion error.
Source§

fn try_from(component: &'a Component<'_>) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl<'a> TryFrom<&'a Components<'_>> for &'a AbsolutePath

Source§

type Error = TryAbsoluteError

The type returned in the event of a conversion error.
Source§

fn try_from(components: &'a Components<'_>) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl<'a> TryFrom<&'a Cow<'_, OsStr>> for &'a AbsolutePath

Source§

type Error = TryAbsoluteError

The type returned in the event of a conversion error.
Source§

fn try_from(s: &'a Cow<'_, OsStr>) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl<'a> TryFrom<&'a Iter<'_>> for &'a AbsolutePath

Source§

type Error = TryAbsoluteError

The type returned in the event of a conversion error.
Source§

fn try_from(iter: &'a Iter<'_>) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl<'a> TryFrom<&'a OsStr> for &'a AbsolutePath

Source§

type Error = TryAbsoluteError

The type returned in the event of a conversion error.
Source§

fn try_from(s: &'a OsStr) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl<'a> TryFrom<&'a OsString> for &'a AbsolutePath

Source§

type Error = TryAbsoluteError

The type returned in the event of a conversion error.
Source§

fn try_from(s: &'a OsString) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl<'a> TryFrom<&'a Path> for &'a AbsolutePath

Source§

type Error = TryAbsoluteError

The type returned in the event of a conversion error.
Source§

fn try_from(path: &'a Path) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl<'a> TryFrom<&'a Path> for &'a AbsolutePath

Source§

type Error = TryAbsoluteError

The type returned in the event of a conversion error.
Source§

fn try_from(path: &'a Path) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl TryFrom<&Path> for Box<AbsolutePath>

Source§

type Error = TryAbsoluteError

The type returned in the event of a conversion error.
Source§

fn try_from(path: &Path) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl TryFrom<&Path> for Box<AbsolutePath>

Source§

type Error = TryAbsoluteError

The type returned in the event of a conversion error.
Source§

fn try_from(path: &Path) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl<'a> TryFrom<&'a PathBuf> for &'a AbsolutePath

Source§

type Error = TryAbsoluteError

The type returned in the event of a conversion error.
Source§

fn try_from(buf: &'a PathBuf) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl<'a> TryFrom<&'a PathBuf> for &'a AbsolutePath

Source§

type Error = TryAbsoluteError

The type returned in the event of a conversion error.
Source§

fn try_from(buf: &'a PathBuf) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl<'a> TryFrom<&'a String> for &'a AbsolutePath

Source§

type Error = TryAbsoluteError

The type returned in the event of a conversion error.
Source§

fn try_from(s: &'a String) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl<'a> TryFrom<&'a str> for &'a AbsolutePath

Source§

type Error = TryAbsoluteError

The type returned in the event of a conversion error.
Source§

fn try_from(s: &'a str) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl TryFrom<Box<Path>> for Box<AbsolutePath>

Source§

type Error = Box<Path>

The type returned in the event of a conversion error.
Source§

fn try_from(path: Box<Path>) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl TryFrom<Box<Path>> for Box<AbsolutePath>

Source§

type Error = Box<Path>

The type returned in the event of a conversion error.
Source§

fn try_from(path: Box<Path>) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl<'a> TryFrom<Cow<'a, Path>> for Box<AbsolutePath>

Source§

type Error = Cow<'a, Path>

The type returned in the event of a conversion error.
Source§

fn try_from(path: Cow<'a, Path>) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl<'a> TryFrom<Cow<'a, Path>> for Box<AbsolutePath>

Source§

type Error = Cow<'a, Path>

The type returned in the event of a conversion error.
Source§

fn try_from(path: Cow<'a, Path>) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl TryFrom<PathBuf> for Box<AbsolutePath>

Source§

type Error = PathBuf

The type returned in the event of a conversion error.
Source§

fn try_from(buf: PathBuf) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl TryFrom<PathBuf> for Box<AbsolutePath>

Source§

type Error = PathBuf

The type returned in the event of a conversion error.
Source§

fn try_from(buf: PathBuf) -> Result<Self, Self::Error>

Performs the conversion.