Trait HasPathSegment

Source
pub trait HasPathSegment {
    // Required method
    fn path_segment(&self) -> String;

    // Provided method
    fn is(&self, identifier: impl PartialEq<String>) -> bool { ... }
}
Expand description

This trait should be implemented by types that have a path segment.

Required Methods§

Source

fn path_segment(&self) -> String

Gets the path segment of the type.

Provided Methods§

Source

fn is(&self, identifier: impl PartialEq<String>) -> bool

Checks if the type is identified by the given 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 HasPathSegment for String

Source§

impl<T: HasPathSegment> HasPathSegment for &T

Source§

impl<T: HasPathSegment> HasPathSegment for &mut T

Implementors§

Source§

impl<Parent, Value> HasPathSegment for Visitor<Parent, Value>
where Value: HasPathSegment,