pub struct NicePathBuf { /* private fields */ }Implementations§
Source§impl NicePathBuf
impl NicePathBuf
pub fn new(path: impl AsRef<Path>) -> Self
pub fn exists(&self) -> Result<bool>
pub fn join(&self, other: impl AsRef<Path>) -> Self
pub fn create_dir_all(&self) -> Result<()>
pub fn remove_dir_all(&self) -> Result<()>
pub fn parent(&self) -> Option<NicePathBuf>
pub fn cwd() -> NicePathBuf
Sourcepub fn env_string(&self) -> String
pub fn env_string(&self) -> String
Returns a string that can be used in the environment to refer to this path.
In the case where this path may be accessed via multiple routes, we will choose the shortest (ie: /tmp on macOS rather than /private/tmp).
Trait Implementations§
Source§impl AsRef<Path> for NicePathBuf
impl AsRef<Path> for NicePathBuf
Source§impl Clone for NicePathBuf
impl Clone for NicePathBuf
Source§fn clone(&self) -> NicePathBuf
fn clone(&self) -> NicePathBuf
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for NicePathBuf
impl Debug for NicePathBuf
Source§impl<'de> Deserialize<'de> for NicePathBuf
impl<'de> Deserialize<'de> for NicePathBuf
Source§fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Display for NicePathBuf
impl Display for NicePathBuf
Source§impl From<&NicePathBuf> for NicePathBuf
impl From<&NicePathBuf> for NicePathBuf
Source§fn from(path: &NicePathBuf) -> Self
fn from(path: &NicePathBuf) -> Self
Converts to this type from the input type.
Source§impl From<&NiceTempDir> for NicePathBuf
impl From<&NiceTempDir> for NicePathBuf
Source§fn from(tempdir: &NiceTempDir) -> Self
fn from(tempdir: &NiceTempDir) -> Self
Converts to this type from the input type.
Source§impl From<&Path> for NicePathBuf
impl From<&Path> for NicePathBuf
Source§impl From<PathBuf> for NicePathBuf
impl From<PathBuf> for NicePathBuf
Source§impl From<String> for NicePathBuf
impl From<String> for NicePathBuf
Source§impl Hash for NicePathBuf
impl Hash for NicePathBuf
Source§impl Ord for NicePathBuf
impl Ord for NicePathBuf
Source§fn cmp(&self, other: &NicePathBuf) -> Ordering
fn cmp(&self, other: &NicePathBuf) -> Ordering
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for NicePathBuf
impl PartialEq for NicePathBuf
Source§fn eq(&self, other: &NicePathBuf) -> bool
fn eq(&self, other: &NicePathBuf) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl PartialOrd for NicePathBuf
impl PartialOrd for NicePathBuf
Source§impl Serialize for NicePathBuf
impl Serialize for NicePathBuf
impl Eq for NicePathBuf
impl StructuralPartialEq for NicePathBuf
Auto Trait Implementations§
impl Freeze for NicePathBuf
impl RefUnwindSafe for NicePathBuf
impl Send for NicePathBuf
impl Sync for NicePathBuf
impl Unpin for NicePathBuf
impl UnsafeUnpin for NicePathBuf
impl UnwindSafe for NicePathBuf
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