Trait AsPath

Source
pub trait AsPath {
    // Required method
    fn as_path(&self) -> Path<'_>;
}
Expand description

A trait for types that can be converted to a Path.

When providing a String/str, any leading/trailing slashes are trimmed and multiple consecutive slashes are collapsed. When already a Path, normalization is skipped as a reference is returned.

Required Methods§

Source

fn as_path(&self) -> Path<'_>

Implementations on Foreign Types§

Source§

impl AsPath for String

Source§

fn as_path(&self) -> Path<'_>

Source§

impl<'a> AsPath for &'a str

Source§

fn as_path(&self) -> Path<'a>

Source§

impl<'a> AsPath for &'a String

Source§

fn as_path(&self) -> Path<'a>

Implementors§

Source§

impl<'a> AsPath for &'a Path<'a>

Source§

impl<'a> AsPath for Path<'a>