Struct watchman_client::CanonicalPath
source · [−]pub struct CanonicalPath(_);
Expand description
Represents a canonical path in the filesystem.
Implementations
sourceimpl CanonicalPath
impl CanonicalPath
sourcepub fn canonicalize<P: AsRef<Path>>(path: P) -> Result<Self, Error>
pub fn canonicalize<P: AsRef<Path>>(path: P) -> Result<Self, Error>
Construct the canonical version of the supplied path.
This function will canonicalize the path and return the
result, if successful.
If you have already canonicalized the path, it is preferable
to use the with_canonicalized_path
function instead.
sourcepub fn with_canonicalized_path(path: PathBuf) -> Self
pub fn with_canonicalized_path(path: PathBuf) -> Self
Construct from an already canonicalized path. This function will panic if the supplied path is not an absolute path!
Trait Implementations
sourceimpl Clone for CanonicalPath
impl Clone for CanonicalPath
sourcefn clone(&self) -> CanonicalPath
fn clone(&self) -> CanonicalPath
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
Auto Trait Implementations
impl RefUnwindSafe for CanonicalPath
impl Send for CanonicalPath
impl Sync for CanonicalPath
impl Unpin for CanonicalPath
impl UnwindSafe for CanonicalPath
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more