Lines Matching refs:CanonicalPath

505 /// `Path::canonicalize`, but `CanonicalPath` has the advantage of being a type distinct from
508 /// It can be beneficial to use `CanonicalPath` instead of `std::path::Path` when you want the type
512 /// Since `CanonicalPath` implements `Deref` for `std::path::Path`, all methods on
513 /// `&std::path::Path` are also available to `&CanonicalPath` values.
515 pub struct CanonicalPath {
519 impl CanonicalPath {
522 /// This calls `which` and `Path::canonicalize` and maps the result into a `CanonicalPath`.
523 pub fn new<T: AsRef<OsStr>>(binary_name: T) -> Result<CanonicalPath> {
526 .map(|inner| CanonicalPath { inner })
531 /// This calls `which_all` and `Path::canonicalize` and maps the results into `CanonicalPath`s.
534 ) -> Result<impl Iterator<Item = Result<CanonicalPath>>> {
540 .map(|inner| CanonicalPath { inner })
548 /// This calls `which_in` and `Path::canonicalize` and maps the result into a `CanonicalPath`.
549 pub fn new_in<T, U, V>(binary_name: T, paths: Option<U>, cwd: V) -> Result<CanonicalPath>
557 .map(|inner| CanonicalPath { inner })
563 /// This calls `which_in_all` and `Path::canonicalize` and maps the result into a `CanonicalPath`.
568 ) -> Result<impl Iterator<Item = Result<CanonicalPath>>>
579 .map(|inner| CanonicalPath { inner })
589 /// Consumes the `which::CanonicalPath`, yielding its underlying `std::path::PathBuf`.
595 impl fmt::Debug for CanonicalPath {
601 impl std::ops::Deref for CanonicalPath {
609 impl AsRef<path::Path> for CanonicalPath {
615 impl AsRef<OsStr> for CanonicalPath {
621 impl PartialEq<path::PathBuf> for CanonicalPath {
627 impl PartialEq<CanonicalPath> for path::PathBuf {
628 fn eq(&self, other: &CanonicalPath) -> bool {