Skip to main content

Named

Trait Named 

Source
pub trait Named {
    // Required method
    fn name(&self) -> Cow<'_, str>;
}
Expand description

Trait for getting the name of an item.

Required Methods§

Source

fn name(&self) -> Cow<'_, str>

Returns the name associated with self. We use Cow to allow both owned and borrowed strings.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§