Trait IsPathSegment

Source
pub trait IsPathSegment:
    PartialEq
    + Eq
    + Hash
    + Clone {
    // Required methods
    fn root() -> Self;
    fn self_() -> Self;
    fn super_() -> Self;

    // Provided method
    fn kind(&self) -> PathSegment<&Self> { ... }
}
Expand description

A trait for types that can be used as path segments.

Required Methods§

Source

fn root() -> Self

Gets the root path segment.

Source

fn self_() -> Self

Gets the self path segment.

Source

fn super_() -> Self

Gets the super path segment.

Provided Methods§

Source

fn kind(&self) -> PathSegment<&Self>

Gets the kind of path segment.

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 IsPathSegment for String

Source§

fn root() -> Self

Source§

fn self_() -> Self

Source§

fn super_() -> Self

Implementors§