Trait AppendToPath

Source
pub trait AppendToPath {
    // Required method
    fn append<P: AsRef<Path>>(self, segment: P) -> PathBuf;
}
Expand description

Make it easy to append a segment to an existing path.

Required Methods§

Source

fn append<P: AsRef<Path>>(self, segment: P) -> PathBuf

Note: segment should be a single file/folder name and not contain / or \\ characters!

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl AppendToPath for PathBuf

Source§

fn append<P: AsRef<Path>>(self, segment: P) -> PathBuf

Source§

impl<'p> AppendToPath for &'p Path

Source§

fn append<P: AsRef<Path>>(self, segment: P) -> PathBuf

Source§

impl<'p> AppendToPath for &'p PathBuf

Source§

fn append<P: AsRef<Path>>(self, segment: P) -> PathBuf

Implementors§