Trait ExpandTilde

Source
pub trait ExpandTilde: Sealed {
    // Required methods
    fn expand_tilde(&self) -> Result<Cow<'_, Path>>;
    fn expand_tilde_owned(&self) -> Result<PathBuf>;
}
Expand description

Represents values that can be tilde-expanded (sealed extension trait).

Required Methods§

Source

fn expand_tilde(&self) -> Result<Cow<'_, Path>>

Expands the tilde (~) component to the home directory.

§Errors

See expand_tilde for more information.

Source

fn expand_tilde_owned(&self) -> Result<PathBuf>

Similar to Self::expand_tilde, but returns owned paths.

§Errors

See expand_tilde_owned for more information.

Implementors§

Source§

impl<P: AsRef<Path> + ?Sized> ExpandTilde for P