pub struct BackendPath(/* private fields */);Expand description
An agent-visible path. Callers must not reinterpret this as a daemon-host
PathBuf; only an execution backend may do that.
Implementations§
Source§impl BackendPath
impl BackendPath
pub fn new(path: impl Into<String>) -> Self
Sourcepub fn is_anchored(path: &str) -> bool
pub fn is_anchored(path: &str) -> bool
Whether path names its location on its own: absolute, ~ or
~/… (the backend’s home). Anything else, ~user included, is
relative to a working directory, as normalize_lexically reads it.
Sourcepub fn is_absolute(path: impl AsRef<str>) -> bool
pub fn is_absolute(path: impl AsRef<str>) -> bool
Whether path is absolute as written, whatever the daemon’s own
platform: /… (a POSIX backend’s paths, and a rooted path on
Windows), a drive path (C:\…, C:/…) or a UNC path (\\server\…).
pub fn as_str(&self) -> &str
pub fn display(&self) -> &str
pub fn join(&self, child: impl AsRef<str>) -> Self
pub fn parent(&self) -> Option<Self>
pub fn file_name(&self) -> Option<&str>
pub fn extension(&self) -> Option<&str>
pub fn with_extension(&self, extension: &str) -> Self
Trait Implementations§
Source§impl Clone for BackendPath
impl Clone for BackendPath
Source§impl Debug for BackendPath
impl Debug for BackendPath
Source§impl Display for BackendPath
impl Display for BackendPath
impl Eq for BackendPath
Source§impl Hash for BackendPath
impl Hash for BackendPath
Source§impl PartialEq for BackendPath
impl PartialEq for BackendPath
impl StructuralPartialEq for BackendPath
Auto Trait Implementations§
impl Forget for BackendPath
impl Freeze for BackendPath
impl Move for BackendPath
impl RefUnwindSafe for BackendPath
impl Send for BackendPath
impl Sync for BackendPath
impl Unpin for BackendPath
impl UnsafeUnpin for BackendPath
impl UnwindSafe for BackendPath
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more