autotrait2 0.1.1

generate trait definitions from impl blocks
Documentation

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 {
        // ...
    }
}