Named

Derive Macro Named 

Source
#[derive(Named)]
{
    // Attributes available to this derive:
    #[named]
}
Expand description

Derive the [typeuri::Named] trait for a struct or enum.

The name of the type is its fully-qualified Rust path. The name may be overridden by providing a string value for the name attribute.

Example:

use typeuri_macros::Named;

#[derive(Named)]
struct MyType;

#[derive(Named)]
#[named(name = "custom::path::MyEnum")]
enum MyEnum { A, B }