[][src]Struct mdsh::cli::Parent

pub struct 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]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.