Crate autotrait2

Crate autotrait2 

Source
Expand description

§autotrait2

actions status crate version dependencies status licenses

Same as the autotrait crate.

Use this crate if the first one didn’t work.

§Usage

This crate allow you to define traits without repeating yourself with a trait block.

So you only need the following:

struct Stuff;

#[autotrait2::autotrait]
impl MyTrait for Stuff {
    fn a_trait_function(&self) -> String {
        // ...
    }
}

Attribute Macros§

autotrait