Skip to main content

HasName

Trait HasName 

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

    // Provided method
    fn name_ascii(&self) -> String { ... }
}
Expand description

A trait for types that have a computed name.

Required Methods§

Source

fn name(&self) -> String

Returns the computed name of the type.

Provided Methods§

Source

fn name_ascii(&self) -> String

Returns the computed name of the type in ASCII.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§