polyquine 0.0.8

Teach Rust types to codegen their own constructors
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
use polyquine::Quine;
#[allow(unused_imports)]

struct BadInner {}

#[derive(Quine)]
enum TestEnum<T> {
    A(T),
    B,
}

fn main() {
    let good = TestEnum::A(String::from("Hello World"));
    good.ctor_tokens();

    let bad = TestEnum::A(BadInner {});
    bad.ctor_tokens();
}