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§
Sourcefn path_segment(&self) -> String
fn path_segment(&self) -> String
Gets the path segment of the type.
Provided Methods§
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.