[−][src]Struct mdsh::cli::Parent
Parent path, gracefully handling relative path inputs
Implementations
impl Parent
[src]
pub fn of(p: &Path) -> Option<Self>
[src]
Create from a Path
, falling back to the
current_dir()
if necessary.
Returns None
if there is no parent (that is we are /
).
pub fn current_dir() -> Self
[src]
Creates a Parent
that is the current directory.
Asks the operating system for the path.
pub fn from_parent_path_buf(buf: PathBuf) -> Self
[src]
Convert from a PathBuf
that is already a parent.
pub fn as_path_buf(&self) -> &PathBuf
[src]
Auto Trait Implementations
impl RefUnwindSafe for Parent
impl Send for Parent
impl Sync for Parent
impl Unpin for Parent
impl UnwindSafe for Parent
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,