pub trait PathSegmentRef<T: PathSegment>: Eq + Hash + Debug {
    // Required methods
    fn is_empty(&self) -> bool;
    fn to_owned(&self) -> T;
}
Expand description

Borrowed path segment.

Required Methods§

source

fn is_empty(&self) -> bool

Check if the segment is empty.

source

fn to_owned(&self) -> T

Convert the borrowed segment reference to an owned value.

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl PathSegmentRef<String> for str

source§

fn is_empty(&self) -> bool

source§

fn to_owned(&self) -> String

source§

impl PathSegmentRef<OsString> for OsStr

source§

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

source§

fn is_empty(&self) -> bool

source§

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

Implementors§