Skip to main content

PathLike

Trait PathLike 

Source
pub trait PathLike<'a>: Sized {
    // Required method
    fn to_cow(self) -> Cow<'a, str>;

    // Provided method
    fn to_owned(self) -> String { ... }
}
Expand description

A trait for values that can be used in path operations.

Required Methods§

Source

fn to_cow(self) -> Cow<'a, str>

Converts this value into a Cow<str>.

Provided Methods§

Source

fn to_owned(self) -> String

Converts this value into a String.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl<'a> PathLike<'a> for &'a &mut Cow<'_, str>

Source§

fn to_cow(self) -> Cow<'a, str>

Source§

impl<'a> PathLike<'a> for &'a &mut String

Source§

fn to_cow(self) -> Cow<'a, str>

Source§

impl<'a> PathLike<'a> for &'a &mut str

Source§

fn to_cow(self) -> Cow<'a, str>

Source§

impl<'a> PathLike<'a> for &'a Cow<'_, str>

Source§

fn to_cow(self) -> Cow<'a, str>

Source§

impl<'a> PathLike<'a> for &'a PathBuf

Source§

fn to_cow(self) -> Cow<'a, str>

Source§

impl<'a> PathLike<'a> for &'a String

Source§

fn to_cow(self) -> Cow<'a, str>

Source§

impl<'a> PathLike<'a> for &'a str

Source§

fn to_cow(self) -> Cow<'a, str>

Source§

impl<'a> PathLike<'a> for Cow<'a, str>

Source§

fn to_cow(self) -> Cow<'a, str>

Source§

impl<'a> PathLike<'a> for String

Source§

fn to_cow(self) -> Cow<'a, str>

Implementors§