batch-impl 0.8.2

A proc-macro library for batch generating trait impls with a powerful DSL
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
use batch_impl::batch_impl;

// The impl's for-Type must match the shape template ident-for-ident — a
// binding during the shape-validity check means the for-Type doesn't carry
// the placeholder slot names.
#[batch_impl(A<B> : [Box]^[u8])]
impl WrongShape for Vec<u32> {
    fn mk() -> Vec<u32> {
        Vec::new()
    }
}

trait WrongShape {
    fn mk() -> Self;
}

fn main() {}